1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-08 12:01:21 +02:00
zsh/Completion/Unix/Command/_sh
Jun-ichi Takimoto 0cfa2dcfc4 36631: separate _zsh from _sh
Do all the completion for zsh by _arguments
2015-09-28 00:09:03 +09:00

14 lines
290 B
Text

#compdef sh ksh bash csh tcsh rc
if (( CURRENT == ${words[(i)-c]} + 1 )); then
_cmdstring
else
local n=${words[(b:2:i)[^-]*]}
if (( n <= CURRENT )); then
compset -n $n
_alternative \
'files:file:_files' \
'commands:command:_normal' && return 0
fi
_default
fi