From e35d41ec1f0ed7a5e5e89bb461ea5b8a6826efa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 12 Aug 2021 12:56:46 +0200 Subject: [PATCH] Add PowerShell instructions to completions help --- pkg/cmd/completion/completion.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/cmd/completion/completion.go b/pkg/cmd/completion/completion.go index 61803ece7..ecfa6ef65 100644 --- a/pkg/cmd/completion/completion.go +++ b/pkg/cmd/completion/completion.go @@ -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 == "" {