#compdef ufind _ufind() { typeset -A opt_args local ret=1 local context curcontext="$curcontext" state line _arguments -s -S -C \ "-h[Prints help information]" \ "--help[Prints help information]" \ "-V[Prints version information]" \ "--version[Prints version information]" \ "1:: :_ufind_commands" \ "*:: :->ufind" \ && ret=0 case $state in (ufind) curcontext="${curcontext%:*:*}:ufind-command-$words[1]:" case $line[1] in (digraph) _arguments -s -S -C \ "-c+[Converts a digraph sequence or a character to the other]" \ "--convert+[Converts a digraph sequence or a character to the other]" \ "-f+[Prints information about matching digraphs]" \ "--filter+[Prints information about matching digraphs]" \ "-d[Prints results with description]" \ "--description[Prints results with description]" \ "-h[Prints help information]" \ "--help[Prints help information]" \ "-V[Prints version information]" \ "--version[Prints version information]" \ && ret=0 ;; (help) _arguments -s -S -C \ "-h[Prints help information]" \ "--help[Prints help information]" \ "-V[Prints version information]" \ "--version[Prints version information]" \ && ret=0 ;; esac ;; esac } (( $+functions[_ufind_commands] )) || _ufind_commands() { local commands; commands=( "digraph:Digraph lookup and resolution" \ "help:Prints this message or the help of the given subcommand(s)" \ ) _describe -t commands 'ufind commands' commands "$@" } (( $+functions[_ufind__digraph_commands] )) || _ufind__digraph_commands() { local commands; commands=( ) _describe -t commands 'ufind digraph commands' commands "$@" } (( $+functions[_ufind__help_commands] )) || _ufind__help_commands() { local commands; commands=( ) _describe -t commands 'ufind help commands' commands "$@" } _ufind "$@"