From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24979 invoked by alias); 29 Aug 2018 06:34:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43350 Received: (qmail 6603 invoked by uid 1010); 29 Aug 2018 06:34:07 -0000 X-Qmail-Scanner-Diagnostics: from rcpt-mqugw.biglobe.ne.jp by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(133.208.100.3):SA:0(-2.6/5.0):. Processed in 0.469747 secs); 29 Aug 2018 06:34:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: takimoto-j@kba.biglobe.ne.jp X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Biglobe-Sender: From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: PATCH: _zsh: support --emulate option Message-Id: <9685F6C8-2D6C-4317-899B-58897AD68324@kba.biglobe.ne.jp> Date: Wed, 29 Aug 2018 14:52:18 +0900 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3273) X-Biglobe-Spnum: 59444 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 =20 -local curcontext=3D$curcontext state state_descr line expl +local curcontext=3D$curcontext state state_descr line expl not=3D'!' typeset -A opt_args =20 +[[ $CURRENT =3D 2 ]] && not=3D'' + _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]' \