Skip to content

Commit

Permalink
Remove untested shell from autocomplete list
Browse files Browse the repository at this point in the history
  • Loading branch information
loicsapone committed Nov 15, 2021
1 parent 9a013ee commit dbb14fd
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (

func newCompletionCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Use: "completion [bash|zsh]",
Short: "Generate completion script",
Hidden: true,

SilenceUsage: true,
SilenceErrors: true,

DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
ValidArgs: []string{"bash", "zsh"},
Args: cobra.ExactValidArgs(1),

RunE: func(cmd *cobra.Command, args []string) error {
Expand All @@ -31,16 +31,6 @@ func newCompletionCommand() *cobra.Command {
if err != nil {
return err
}
case "fish":
err := cmd.Root().GenFishCompletion(os.Stdout, true)
if err != nil {
return err
}
case "powershell":
err := cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout)
if err != nil {
return err
}
}

return nil
Expand Down

0 comments on commit dbb14fd

Please sign in to comment.