From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8394 invoked by alias); 13 Nov 2009 13:54:56 -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: 27403 Received: (qmail 10493 invoked from network); 13 Nov 2009 13:54:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.fr does not designate permitted sender hosts) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=LbqJ94Np6CNjZdqUaRYmkjbz9oixa66jU4FdNF4zCrZ0De8u5eY5/WWYaSIOYDSshCMDEoLdPvg1KYs3k1xCcvxAgZrbg2Vdk2CUVu+Cg3bquOqd+w8w/9SvdCjOY00n02+OEwcwuBFXTpTtsN6SCH7Od/pbRF3fQRQDOGUAdGk= ; X-Yahoo-SMTP: V1UR0WuswBDVD1eFhM33188Ir8ciBckz4W8ZMsAh X-YMail-OSG: abe_qv8VM1mxTriXt2GETcZTNNso_wqAX1AVmCoN740ckufrUw1FUG1arYt5lcGxsL8duuNml1ahpMShcFEt8ZIdHsBtpvcO12QH1EQzQQm592yWFr_aQ51gwLroTsoIT4bRkzO8SQyEgyQbIpdTVhpzVEiB6OG4C3J5MLOgRI7e.P3kLmJUgdN4oyA8IWm1BvmbIkPDAIWYyx4PEu7hUsX6L.mMFHltePBrv4Nl965t.NWxIxRY6yx5So6uQbhr.thSDfPWyZNZpnG13fW2DPJ3YaXgGCRWKBA- X-Yahoo-Newman-Property: ymail-3 Date: Fri, 13 Nov 2009 13:47:55 +0000 From: Stephane Chazelas To: Ingmar Vanhassel Cc: Zsh hackers list , Zsh users list Subject: Re: [PATCH] env completion: add missing explanation of --unset option, fixes alignment of completed arguments Message-ID: Mail-Followup-To: Ingmar Vanhassel , Zsh hackers list , Zsh users list References: <1258056819-4409-1-git-send-email-ingmar@exherbo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1258056819-4409-1-git-send-email-ingmar@exherbo.org> User-Agent: Mutt/1.5.16 (2007-09-19) 2009-11-12 21:13:39 +0100, Ingmar Vanhassel: > --- > Completion/Unix/Command/_env | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > I was getting a few patch series ready to send, but I guess I can fire this one > off already, it probably fixes your issue. > > What I've not figured out, is how to make 'env FOO=bar quux ' complete > options to 'quux'. I guess that'll take someone with more experience than me. > > diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env > index 2638186..383891f 100644 > --- a/Completion/Unix/Command/_env > +++ b/Completion/Unix/Command/_env > @@ -3,7 +3,7 @@ > if _pick_variant gnu=Free\ Soft unix --version; then > _arguments \ > '(--ignore-environment -i)'{-i,--ignore-environment}'[start with empty environment]' \ > - {-u,--unset=}':env var to remove:compadd ${(k)parameters[(R)*export*]}' \ > + '(--unset= -u)'{-u,--unset=}'[remove variable from the environment]:env var to remove:compadd ${(k)parameters[(R)*export*]}' \ That doesn't solve the OP's initial problem (that the -u option wasn't offered anymore after it has been provided once). You'd need: '*'{-u,--unset=}... instead (as someone already pointed out). > '--help[help]' \ > '--version[version]' \ > '*::arguments: _normal' -- Stephane