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 }}
|
{{- end }}
|
||||||
{{- if gt (len .Cmd.Subcommands) 0 -}}
|
{{- if gt (len .Cmd.Subcommands) 0 -}}
|
||||||
{{ " " }}\
|
{{ " " }}\
|
||||||
'1: :{_describe 'command' commands}' \
|
'1: :{_describe 'command' {{ $varPrefix }}commands}' \
|
||||||
'*:: :->args'
|
'*:: :->args'
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
|
@ -61,7 +61,6 @@ var zshTpl = template.Must(template.New("zsh").Funcs(tplFuncs).Parse(`
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
|
||||||
function _{{ $varName }} {
|
function _{{ $varName }} {
|
||||||
{{ template "cmd" (map "Cmd" .RootCmd) -}}
|
{{ template "cmd" (map "Cmd" .RootCmd) -}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue