mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
Fixed error handling
This commit is contained in:
parent
de8dcff803
commit
6777d639c0
@ -25,17 +25,13 @@ func createBashCompletionCmd(rootCmd *cobra.Command) *cobra.Command {
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
switch shellVariant {
|
||||
case "bash", "":
|
||||
rootCmd.GenBashCompletion(os.Stdout)
|
||||
return nil
|
||||
return rootCmd.GenBashCompletion(os.Stdout)
|
||||
case "zsh":
|
||||
rootCmd.GenZshCompletion(os.Stdout)
|
||||
return nil
|
||||
return rootCmd.GenZshCompletion(os.Stdout)
|
||||
case "fish":
|
||||
rootCmd.GenFishCompletion(os.Stdout, true)
|
||||
return nil
|
||||
return rootCmd.GenFishCompletion(os.Stdout, true)
|
||||
case "powershell":
|
||||
rootCmd.GenPowerShellCompletion(os.Stdout)
|
||||
return nil
|
||||
return rootCmd.GenPowerShellCompletion(os.Stdout)
|
||||
default:
|
||||
return fmt.Errorf("Unknown variant %v", shellVariant)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user