1#compdef sh ksh bash zsh csh tcsh rc 2 3if [[ $service == zsh ]]; then 4 # try a bit harder 5 if [[ ${words[CURRENT-1]} == -o ]]; then 6 _options 7 # no other possibilities 8 return 9 fi 10fi 11 12if (( CURRENT == ${words[(i)-c]} + 1 )); then 13 compset -q 14 _normal 15else 16 local n=${words[(b:2:i)[^-]*]} 17 if (( n <= CURRENT )); then 18 compset -n $n 19 _alternative \ 20 'files:file:_files' \ 21 'commands:command:_normal' && return 0 22 fi 23 _default 24fi 25 26local ret=$? 27 28[[ $service == zsh ]] && _arguments -S -s -- '*:' && ret=0 29 30return ret 31