(cmd *cobra.Command, args []string, toComplete string)
| 76 | } |
| 77 | |
| 78 | func (i *initCmd) completion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { |
| 79 | var suggestions []string |
| 80 | |
| 81 | // Provide flag completion |
| 82 | for _, flag := range []string{"--url", "-u", "--branch", "-b", "--force", "-f"} { |
| 83 | if strings.HasPrefix(flag, toComplete) { |
| 84 | suggestions = append(suggestions, flag) |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | return suggestions, cobra.ShellCompDirectiveNoFileComp |
| 89 | } |
no outgoing calls