From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27380 invoked by alias); 16 Dec 2014 01:37:47 -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: 33977 Received: (qmail 13901 invoked from network); 16 Dec 2014 01:37:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=x-sasl-enc:date:from:to:subject:message-id :mime-version:content-type; s=mesmtp; bh=C7CIiA5R27GYtzl/0eZ70E4 i7rw=; b=QWh0dqhxSzw0HFbPDp4l0wk2LaGEpanu+FeL/sYahUF7xtGHJq4B27K xs7KHPX2uwTnLWA63lggnbeTo8QyF5fEJvj8T28q7grUQUriPteW4SKY+J94w3AM a27ZmjSGDffKQjVn2cs/XApZGF1gU2vKerzKBdfFs75LOZ5GcMKM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:date:from:to:subject :message-id:mime-version:content-type; s=smtpout; bh=C7CIiA5R27G Ytzl/0eZ70E4i7rw=; b=UjAqyuVIxpw2hrYMbYW4NzNjsG9ZIi1u/AF5gxQ7MTG zxN47A9w20TAB0o7eSaOdv5YQzgDJmDa84BWlSTEGO3DI2SbkQTIgoVTHn03LsIF BEjoFGheGsa0Z4bJBdbUNMhPj+wSKXjV1ynXQuv7pYbpDL0QXDvBKi8QMlHbqqBQ = X-Sasl-enc: 4oZtL6plUiSsrB1ct4lDf42c/EnOp29tZyTZyRUIdBDj 1418693852 Date: Tue, 16 Dec 2014 01:37:23 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] _bindkey: Fix first argument completion. Message-ID: <20141216013723.GB2138@tarsus.local2> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="CE+1k2dSO48ffgeK" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) --CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Before this commit, 'bindkey -' would offer screenfuls of widgets, rather than just the options. That was caused by the 'r:|-=* r:|=*' matcher being applied, which considered the "-" a possible positional argument. Fix the problem by informing _arguments that the first positional argument can never be a widget. --- Completion/Zsh/Command/_bindkey | 1 + 1 file changed, 1 insertion(+) diff --git a/Completion/Zsh/Command/_bindkey b/Completion/Zsh/Command/_bindkey index 045cba9..4c4aeda 100644 --- a/Completion/Zsh/Command/_bindkey +++ b/Completion/Zsh/Command/_bindkey @@ -26,6 +26,7 @@ _arguments -C -s -S \ '(-l -L -d -D -A -N -m -s *)-r[unbind specified in-strings]:*:in-string' \ '(-l -L -d -D -A -N -m -p -r *)-s[bind each in-string to each out-string]:*:key string' \ '(-e -v -a -M -l -L -d -D -A -N -m -p)-R[interpret in-strings as ranges]' \ + '(-l -L -d -A -N -m -p -r -s):in-string' \ '(-l -L -d -A -N -m -p -r -s)*::widgets:->widget' && ret=0 case $state in -- 1.7.10.4 --CE+1k2dSO48ffgeK Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="0001-_bindkey-Fix-first-argument-completion.patch" >>From f7aafab1fbeba95ad601fb67d0ae40d7f8cba6ce Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 15 Dec 2014 17:31:35 +0000 Subject: [PATCH] _bindkey: Fix first argument completion. Before this commit, 'bindkey -' would offer screenfuls of widgets, rather than just the options. That was caused by the 'r:|-=* r:|=*' matcher being applied, which considered the "-" a possible positional argument. Fix the problem by informing _arguments that the first positional argument can never be a widget. --- Completion/Zsh/Command/_bindkey | 1 + 1 file changed, 1 insertion(+) diff --git a/Completion/Zsh/Command/_bindkey b/Completion/Zsh/Command/_bindkey index 045cba9..4c4aeda 100644 --- a/Completion/Zsh/Command/_bindkey +++ b/Completion/Zsh/Command/_bindkey @@ -26,6 +26,7 @@ _arguments -C -s -S \ '(-l -L -d -D -A -N -m -s *)-r[unbind specified in-strings]:*:in-string' \ '(-l -L -d -D -A -N -m -p -r *)-s[bind each in-string to each out-string]:*:key string' \ '(-e -v -a -M -l -L -d -D -A -N -m -p)-R[interpret in-strings as ranges]' \ + '(-l -L -d -A -N -m -p -r -s):in-string' \ '(-l -L -d -A -N -m -p -r -s)*::widgets:->widget' && ret=0 case $state in -- 1.7.10.4 --CE+1k2dSO48ffgeK--