mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08: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…
x
Reference in New Issue
Block a user