X Tutup
Skip to content

Commit e35d41e

Browse files
committed
Add PowerShell instructions to completions help
1 parent c39dd1e commit e35d41e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/cmd/completion/completion.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ func NewCmdCompletion(io *iostreams.IOStreams) *cobra.Command {
5353
Generate a %[1]sgh.fish%[1]s completion script:
5454
5555
gh completion -s fish > ~/.config/fish/completions/gh.fish
56+
57+
### PowerShell
58+
59+
Open your profile script with:
60+
61+
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
62+
notepad $profile
63+
64+
Add the line and save the file:
65+
66+
Invoke-Expression -Command $(gh completion -s powershell | Out-String)
5667
`, "`"),
5768
RunE: func(cmd *cobra.Command, args []string) error {
5869
if shellType == "" {

0 commit comments

Comments
 (0)
X Tutup