1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-17 12:41:14 +02:00

36631: separate _zsh from _sh

Do all the completion for zsh by _arguments
This commit is contained in:
Jun-ichi Takimoto 2015-09-28 00:09:03 +09:00
parent 50721a1986
commit 0cfa2dcfc4
3 changed files with 14 additions and 16 deletions

View file

@ -1,3 +1,8 @@
2015-09-28 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 36631: Completion/Unix/Command/_sh,
Completion/Unix/Command/_zsh: separate _zsh from _sh
2015-09-26 Barton E. Schaefer <schaefer@zsh.org>
* 36641: Src/Modules/complist.c: fix multibyte handling in

View file

@ -1,13 +1,4 @@
#compdef sh ksh bash zsh csh tcsh rc
if [[ $service == zsh ]]; then
# try a bit harder
if [[ ${words[CURRENT-1]} == -o ]]; then
_options
# no other possibilities
return
fi
fi
#compdef sh ksh bash csh tcsh rc
if (( CURRENT == ${words[(i)-c]} + 1 )); then
_cmdstring
@ -21,9 +12,3 @@ else
fi
_default
fi
local ret=$?
[[ $service == zsh ]] && _arguments -S -s -- && ret=0
return ret

View file

@ -0,0 +1,8 @@
#compdef zsh
_arguments -S -s : \
'*-o+[set named option]:option:_options' \
'*+o+[unset named option]:option:_options' \
'(1 -)-c[run a command]:command:_cmdstring' \
'(-)1:script file:_files' \
'*:command arguments' --