* Re: Bug#375959: zsh: env completion is broken
[not found] <20060629084428.24836.2226.reportbug@neo.luffy.cx>
@ 2007-12-13 18:07 ` Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2007-12-13 18:07 UTC (permalink / raw)
To: Vincent Bernat, 375959; +Cc: zsh-workers
On Thu, Jun 29, 2006 at 10:44:28AM +0200, Vincent Bernat wrote:
> env completion does not work correctly.
>
> env <TAB> is correct but env VAR1=value1 VAR2=value2 <TAB> only
> searches for files while it should search for external commands.
I don't think this is quite right.
Index: Completion/Unix/Command/_env
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_env,v
retrieving revision 1.1
diff -u -r1.1 _env
--- Completion/Unix/Command/_env 13 Apr 2006 02:46:50 -0000 1.1
+++ Completion/Unix/Command/_env 13 Dec 2007 18:06:40 -0000
@@ -1,12 +1,22 @@
#compdef env
+local context state line
+typeset -A opt_args
+
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*]}' \
'--help[help]' \
'--version[version]' \
- '*::arguments: _normal'
+ '*::arguments:->args' && return 0
+
+ case "$state" in
+ (args)
+ compset -n $(( words[(i)[^=]##] - 1 ))
+ _normal
+ ;;
+ esac
else
_precommand
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-13 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20060629084428.24836.2226.reportbug@neo.luffy.cx>
2007-12-13 18:07 ` Bug#375959: zsh: env completion is broken Clint Adams
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).