Fix completions for redskyctl
@@ -51,11 +51,11 @@ redskyctl completion zsh > $ZSH/completions/_redskyctl`,
func (o *Options) completion(cmd *cobra.Command) error {
switch o.Shell {
case "bash":
- return cmd.GenBashCompletion(cmd.OutOrStdout())
+ return cmd.Root().GenBashCompletion(cmd.OutOrStdout())
case "fish":
- return cmd.GenFishCompletion(cmd.OutOrStdout(), true)
+ return cmd.Root().GenFishCompletion(cmd.OutOrStdout(), true)
case "zsh":
- return cmd.GenZshCompletion(cmd.OutOrStdout())
+ return cmd.Root().GenZshCompletion(cmd.OutOrStdout())
default:
return fmt.Errorf("completion is not implemented for %s", o.Shell)
}
