Allow commands to customize argument parsing

This commit is contained in:
Kovid Goyal
2022-11-14 15:41:58 +05:30
parent 67f556bd7c
commit a32a8d096d
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ func complete_word(word string, completions *Completions, only_args_allowed bool
return
}
func (cmd *Command) parse_args(words []string, completions *Completions) {
func default_parse_args(cmd *Command, words []string, completions *Completions) {
completions.current_cmd = cmd
if len(words) == 0 {
complete_word("", completions, false, nil, 0)