12345678910111213141516171819202122 |
- #compdef lcli
- _lcli () {
- local state context line expl ret=1
- typeset -A opt_args
- local tmp cmd
- _arguments \
- "1:commands:(($(lcli --list-commands | sed -e 's/\s\+\(.*\)/\\:"\1"/')))" \
- '*:: :->command'
- if [[ -z $state ]]; then
- ret=0
- else
- words[1]=lcli_$words[1]
- _normal && ret=0
- fi
- return ret
- }
|