Fix subcommands in zsh implementation

This commit is contained in:
Evan Fiordeliso 2023-11-13 17:16:22 -05:00
parent 384863fcdf
commit b4d610e5fd
1 changed files with 1 additions and 2 deletions

View File

@ -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) -}}
}