From: Stephane Chazelas <stephane_chazelas@yahoo.fr>
To: Ingmar Vanhassel <ingmar@exherbo.org>
Cc: Zsh hackers list <zsh-workers@zsh.org>,
Zsh users list <zsh-users@zsh.org>
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 [thread overview]
Message-ID: <chaz20091113134755.GA4093@seebyte.com> (raw)
In-Reply-To: <1258056819-4409-1-git-send-email-ingmar@exherbo.org>
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
prev parent reply other threads:[~2009-11-13 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LNX.2.01.0911121446150.26715@hp.internal>
2009-11-12 20:13 ` Ingmar Vanhassel
2009-11-12 20:52 ` Benjamin R. Haskell
2009-11-12 21:16 ` Ingmar Vanhassel
2009-11-12 21:46 ` Benjamin R. Haskell
2009-11-13 13:47 ` Stephane Chazelas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=chaz20091113134755.GA4093@seebyte.com \
--to=stephane_chazelas@yahoo.fr \
--cc=ingmar@exherbo.org \
--cc=zsh-users@zsh.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).