summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2018-08-30 00:58:29 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2018-08-30 00:58:29 +0900
commit7d905fd4feaf574c25142ec650d865c7f575f421 (patch)
treea4c8e7e906653f824a520a205c6de075e2f1f3ae
parent5ff259d41336f592f9e0c7d31dd0603dad449343 (diff)
downloadzsh-7d905fd4feaf574c25142ec650d865c7f575f421.tar.gz
zsh-7d905fd4feaf574c25142ec650d865c7f575f421.zip
43350: _zsh: support --emulate
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_zsh5
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ede50cbd6..cfecf7c12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
* 43349: Completion/X/Command/_eog: new completion for eog
+ * 43350: Completion/Unix/Command/_zsh: support --emulate
+
2018-08-29 Oliver Kiddle <okiddle@yahoo.co.uk>
* 43346: Completion/Linux/Command/_cryptsetup,
diff --git a/Completion/Unix/Command/_zsh b/Completion/Unix/Command/_zsh
index a5414670b..e6292a636 100644
--- a/Completion/Unix/Command/_zsh
+++ b/Completion/Unix/Command/_zsh
@@ -1,9 +1,12 @@
#compdef zsh
-local curcontext=$curcontext state state_descr line expl
+local curcontext=$curcontext state state_descr line expl not='!'
typeset -A opt_args
+[[ $CURRENT = 2 ]] && not=''
+
_arguments -S -s : \
+ ${not}'--emulate[specify emulation mode]:mode:(zsh sh ksh csh)' \
'*-o+[set named option]:option:_options' \
'*+o+[unset named option]:option:_options' \
'(1 -s --shinstdin)'{-s,--shinstdin}'[read commands from standard input]' \