Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] env completion: add missing explanation of --unset option, fixes alignment of completed arguments
- X-seq: zsh-users 14570
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- To: Ingmar Vanhassel <ingmar@xxxxxxxxxxx>
- Subject: Re: [PATCH] env completion: add missing explanation of --unset option, fixes alignment of completed arguments
- Date: Fri, 13 Nov 2009 13:47:55 +0000
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>, Zsh users list <zsh-users@xxxxxxx>
- 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= ;
- In-reply-to: <1258056819-4409-1-git-send-email-ingmar@xxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: Ingmar Vanhassel <ingmar@xxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>, Zsh users list <zsh-users@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <alpine.LNX.2.01.0911121446150.26715@xxxxxxxxxxx> <1258056819-4409-1-git-send-email-ingmar@xxxxxxxxxxx>
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 <TAB>' 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author