@@ -490,7 +490,7 @@ activate-global-python-argcomplete
490
490
491
491
### Fine granular python argcomplete
492
492
493
- For Bash autocompletion, add this to your ` ~/.bashrc ` :
493
+ For Bash (linux, MacOS) autocompletion, add this to your ` ~/.bashrc ` :
494
494
495
495
``` bash
496
496
eval " $( register-python-argcomplete ardupilot_methodic_configurator) "
@@ -500,7 +500,7 @@ eval "$(register-python-argcomplete param_pid_adjustment_update)"
500
500
eval " $( register-python-argcomplete mavftp) "
501
501
```
502
502
503
- For Zsh autocompletion, add these lines to your ` ~/.zshrc ` :
503
+ For Zsh (linux, MacOS) autocompletion, add these lines to your ` ~/.zshrc ` :
504
504
505
505
``` zsh
506
506
autoload -U bashcompinit
@@ -512,32 +512,16 @@ eval "$(register-python-argcomplete param_pid_adjustment_update)"
512
512
eval " $( register-python-argcomplete mavftp) "
513
513
```
514
514
515
- For PowerShell autocompletion, run this command in PowerShell:
515
+ For PowerShell (MS Windows) autocompletion, run this command in PowerShell:
516
516
517
517
``` powershell
518
- $scripts = @(
519
- 'ardupilot_methodic_configurator',
520
- 'extract_param_defaults',
521
- 'annotate_params',
522
- 'param_pid_adjustment_update',
523
- 'mavftp'
524
- )
525
- foreach ($script in $scripts) {
526
- Register-ArgumentCompleter -Native -CommandName $script -ScriptBlock {
527
- param($wordToComplete, $commandAst, $cursorPosition)
528
- $command = $script
529
- $env:COMP_LINE = $commandAst.ToString()
530
- $env:COMP_POINT = $cursorPosition
531
- $env:_ARGCOMPLETE = "1"
532
- $env:_ARGCOMPLETE_COMP_WORDBREAKS = " `"`'><=;|&(:"
533
- $env:COMP_WORDS = $commandAst.ToString()
534
- $env:COMP_CWORD = $cursorPosition
535
-
536
- (& python -m argcomplete.completers $command) | ForEach-Object {
537
- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
538
- }
539
- }
540
- }
518
+ notepad $PROFILE
519
+ ```
520
+
521
+ And add this line to the file:
522
+
523
+ ``` powershell
524
+ Import-Module "C:\Program Files (x86)\ardupilot_methodic_configurator\ardupilot_methodic_configurator_command_line_completion.psm1"
541
525
```
542
526
543
527
<!-- Gurubase Widget -->
0 commit comments