From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29702 invoked by alias); 7 Nov 2016 10:20:19 -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: X-Seq: 39855 Received: (qmail 2430 invoked from network); 7 Nov 2016 10:20:19 -0000 X-Qmail-Scanner-Diagnostics: from rcpt-expgw.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.98.2):SA:0(-2.0/5.0):. Processed in 0.338999 secs); 07 Nov 2016 10:20:19 -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.0 required=5.0 tests=RP_MATCHES_RCVD,SPF_PASS autolearn=unavailable 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: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf01.biglobe.ne.jp designates 133.208.98.2 as permitted sender) X-Biglobe-Sender: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: [PATCH] new completion for jot From: "Jun T." In-Reply-To: Date: Mon, 7 Nov 2016 19:20:11 +0900 Content-Transfer-Encoding: 7bit Message-Id: References: To: "zsh-workers@zsh.org" X-Mailer: Apple Mail (2.1510) X-Biglobe-Spnum: 52718 I'll push the patch with the following modification: diff --git a/Completion/BSD/Command/_jot b/Completion/BSD/Command/_jot index 67116d3..e8abcb7 100644 --- a/Completion/BSD/Command/_jot +++ b/Completion/BSD/Command/_jot @@ -41,6 +41,7 @@ case $state in 'c:character' ) + compset -P '([^%]#%%)#' if compset -P '[^%]#%'; then # flags: (|\#)(| )(|+|-) compset -P '(\#|\\\#)' && flags=( ${(@)flags:#\#*} ) @@ -56,10 +57,11 @@ case $state in if compset -P '((|l)[diouxX]|[feEgGc])'; then _message -e format-rest 'rest of the format' && ret=0 else - (( $#flags )) && _describe -t flags 'flag' flags -S '' && ret=0 - _describe -t width-precision 'width.precision' digits -S '' && ret=0 - _describe -t conversion-specifiers 'conversion specifier' \ - conversions -S '' && ret=0 + local opts=( -S '' ) + _alternative -O opts 'flags:flag:(( $flags ))' \ + "width-precision:width.precision:($digits)" \ + 'conversion-specifiers:conversion specifier:(( $conversions ))' \ + && ret=0 fi else local expl