Add PowerShell instructions to completions help

This commit is contained in:
Mislav Marohnić 2021-08-12 12:56:46 +02:00
parent c39dd1e3eb
commit e35d41ec1f

View file

@ -53,6 +53,17 @@ func NewCmdCompletion(io *iostreams.IOStreams) *cobra.Command {
Generate a %[1]sgh.fish%[1]s completion script:
gh completion -s fish > ~/.config/fish/completions/gh.fish
### PowerShell
Open your profile script with:
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
notepad $profile
Add the line and save the file:
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
`, "`"),
RunE: func(cmd *cobra.Command, args []string) error {
if shellType == "" {