Fix subcommands in zsh implementation
This commit is contained in:
parent
384863fcdf
commit
b4d610e5fd
|
@ -43,7 +43,7 @@ var zshTpl = template.Must(template.New("zsh").Funcs(tplFuncs).Parse(`
|
|||
{{- end }}
|
||||
{{- if gt (len .Cmd.Subcommands) 0 -}}
|
||||
{{ " " }}\
|
||||
'1: :{_describe 'command' commands}' \
|
||||
'1: :{_describe 'command' {{ $varPrefix }}commands}' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
|
@ -61,7 +61,6 @@ var zshTpl = template.Must(template.New("zsh").Funcs(tplFuncs).Parse(`
|
|||
{{ end }}
|
||||
{{ end -}}
|
||||
|
||||
|
||||
function _{{ $varName }} {
|
||||
{{ template "cmd" (map "Cmd" .RootCmd) -}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue