File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 77)
88
99var completionCmd = & cobra.Command {
10- Use : "completion [zsh]" ,
10+ Use : "completion [zsh|fish ]" ,
1111 Short : "Generate shell completion script" ,
1212 Long : `Generate shell completion script for cloudamqp CLI.
1313
2121 # To load completions for each session, add the script to your zsh completion directory:
2222 cloudamqp completion zsh > "${fpath[1]}/_cloudamqp"
2323
24- # You may need to restart your shell for completions to take effect.
24+ Fish:
25+ cloudamqp completion zsh > "$XDG_CONFIG_HOME/fish/completions/cloudamqp.fish"
26+
27+ # You may need to restart your shell for completions to take effect.
2528` ,
2629 DisableFlagsInUseLine : true ,
27- ValidArgs : []string {"zsh" },
30+ ValidArgs : []string {"zsh" , "fish" },
2831 Args : cobra .MatchAll (cobra .ExactArgs (1 ), cobra .OnlyValidArgs ),
2932 RunE : func (cmd * cobra.Command , args []string ) error {
3033 switch args [0 ] {
3134 case "zsh" :
3235 return cmd .Root ().GenZshCompletion (os .Stdout )
36+ case "fish" :
37+ return cmd .Root ().GenFishCompletion (os .Stdout , false )
3338 }
3439 return nil
3540 },
You can’t perform that action at this time.
0 commit comments