1 2 3 4 5 6 7 8 9 10 11
#compdef tla local -a subcmds subcmds=(${${${(M)${(f)"$(_call_program tla tla help)"}:#[ ]* : *}% : *}##[ ]##} ) if (( CURRENT == 2 )); then _describe -t commands 'tla command' compadd - "$subcmds[@]" else _files fi