@@ -791,10 +791,10 @@ French commands:
791791 au-revoir Say goodbye
792792```
793793
794- ## Bash, Zsh, and Fish Completions
794+ ## Bash, Zsh, Fish, and Pwsh Completions
795795
796796` optparse-applicative ` has built-in support for the completion of
797- command line options and arguments in bash, zsh, and fish shells.
797+ command line options and arguments in bash, zsh, fish, and pwsh shells.
798798Any parser, when run using the ` execParser ` family of functions,
799799is automatically extended with a few (hidden) options for the
800800completion system:
@@ -817,13 +817,25 @@ completion system:
817817
818818 - ` --fish-completion-script ` : which is analogous for fish shell;
819819
820+ - ` --pwsh-completion-script ` : which is analogous for powershell/pwsh.
821+ You might want to generate a script and then dot-source it as
822+
823+ ``` console
824+ PS> foo --pwsh-completion-script (Get-Command foo).Source >> _foo.ps1
825+ PS> . _foo.ps1
826+ ```
827+ Note for windows users - this will generate completion script for ` foo.exe ` ,
828+ which is not equivalent to ` foo ` from tab-completion engine's point of view,
829+ even though from usage point view they are equivalent. You might want to edit
830+ the file ` _foo.ps1 ` if you prefer to use ` foo ` and not ` foo.exe ` .
831+
820832 - ` --bash-completion-index ` , ` --bash-completion-word ` : internal options used
821833 by the completion script to obtain a list of possible completions for a
822834 given command line;
823835
824836 - ` --bash-completion-enriched ` : a flag to tell the completion system to emit
825837 descriptions along with possible completions. This is used to provide help
826- along with the completion for ` zsh ` and ` fish ` .
838+ along with the completion for ` zsh ` , ` fish ` , and ` pwsh ` .
827839
828840### Actions and completers
829841
0 commit comments