@@ -475,6 +475,10 @@ For Bash autocompletion, add this to your `~/.bashrc`:
475475
476476``` bash
477477eval " $( register-python-argcomplete ardupilot_methodic_configurator) "
478+ eval " $( register-python-argcomplete extract_param_defaults) "
479+ eval " $( register-python-argcomplete annotate_params) "
480+ eval " $( register-python-argcomplete param_pid_adjustment_update) "
481+ eval " $( register-python-argcomplete mavftp) "
478482```
479483
480484For Zsh autocompletion, add these lines to your ` ~/.zshrc ` :
@@ -483,17 +487,36 @@ For Zsh autocompletion, add these lines to your `~/.zshrc`:
483487autoload -U bashcompinit
484488bashcompinit
485489eval " $( register-python-argcomplete ardupilot_methodic_configurator) "
490+ eval " $( register-python-argcomplete extract_param_defaults) "
491+ eval " $( register-python-argcomplete annotate_params) "
492+ eval " $( register-python-argcomplete param_pid_adjustment_update) "
493+ eval " $( register-python-argcomplete mavftp) "
486494```
487495
488496For PowerShell autocompletion, run this command in PowerShell:
489497
490498``` powershell
491- Register-ArgumentCompleter -Native -CommandName ardupilot_methodic_configurator -ScriptBlock {
492- param($wordToComplete, $commandAst, $cursorPosition)
493- $env:COMP_LINE=$commandAst.ToString()
494- $env:COMP_POINT=$cursorPosition
495- ardupilot_methodic_configurator | ForEach-Object {
496- [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
499+ $scripts = @(
500+ 'ardupilot_methodic_configurator',
501+ 'extract_param_defaults',
502+ 'annotate_params',
503+ 'param_pid_adjustment_update',
504+ 'mavftp'
505+ )
506+ foreach ($script in $scripts) {
507+ Register-ArgumentCompleter -Native -CommandName $script -ScriptBlock {
508+ param($wordToComplete, $commandAst, $cursorPosition)
509+ $command = $script
510+ $env:COMP_LINE = $commandAst.ToString()
511+ $env:COMP_POINT = $cursorPosition
512+ $env:_ARGCOMPLETE = "1"
513+ $env:_ARGCOMPLETE_COMP_WORDBREAKS = " `"`'><=;|&(:"
514+ $env:COMP_WORDS = $commandAst.ToString()
515+ $env:COMP_CWORD = $cursorPosition
516+
517+ (& python -m argcomplete.completers $command) | ForEach-Object {
518+ [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
519+ }
497520 }
498521}
499522```
0 commit comments