Skip to content

Clarify how to use the PowerShell completions #695

@JanPokorny

Description

@JanPokorny

Describe the feature or problem you’d like to solve

The page https://cli.github.com/manual/gh_completion explains to use the completions by adding eval "$(gh completion)" to a profile file.

For PowerShell, the equivalent command is gh completion -s powershell | iex, which produces the following error:

> gh completion -s powershell | iex
iex : At line:1 char:67
+ Register-ArgumentCompleter -Native -CommandName 'gh' -ScriptBlock {
+                                                                   ~
Missing closing '}' in statement block or type definition.
At line:1 char:31
+ gh completion -s powershell | iex
+                               ~~~
    + CategoryInfo          : ParserError: (:) [Invoke-Expression], ParseException
    + FullyQualifiedErrorId : MissingEndCurlyBrace,Microsoft.PowerShell.Commands.InvokeExpressionCommand

Proposed solution

Explain how to use the PowerShell completions

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsenhancementa request to improve CLIhelp wantedContributions welcomewindowsRelated to Windows hosts or runners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions