@@ -490,7 +490,7 @@ activate-global-python-argcomplete
490490
491491### Fine granular python argcomplete
492492
493- For Bash autocompletion, add this to your ` ~/.bashrc ` :
493+ For Bash (linux, MacOS) autocompletion, add this to your ` ~/.bashrc ` :
494494
495495``` bash
496496eval " $( register-python-argcomplete ardupilot_methodic_configurator) "
@@ -500,7 +500,7 @@ eval "$(register-python-argcomplete param_pid_adjustment_update)"
500500eval " $( register-python-argcomplete mavftp) "
501501```
502502
503- For Zsh autocompletion, add these lines to your ` ~/.zshrc ` :
503+ For Zsh (linux, MacOS) autocompletion, add these lines to your ` ~/.zshrc ` :
504504
505505``` zsh
506506autoload -U bashcompinit
@@ -512,32 +512,16 @@ eval "$(register-python-argcomplete param_pid_adjustment_update)"
512512eval " $( register-python-argcomplete mavftp) "
513513```
514514
515- For PowerShell autocompletion, run this command in PowerShell:
515+ For PowerShell (MS Windows) autocompletion, run this command in PowerShell:
516516
517517``` 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"
541525```
542526
543527<!-- Gurubase Widget -->
0 commit comments