about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Command/_env12
-rw-r--r--Completion/Zsh/Command/_precommand2
3 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f1eaaeca4..f55de5ffa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-13  Clint Adams  <clint@zsh.org>
+
+	* 22418: Completion/Unix/Command/_env,
+	Completion/Zsh/Command/_precommand: completion for
+	GNU env.
+
 2006-04-11  Peter Stephenson  <pws@csr.com>
 
 	* 22417: Functions/MIME/zsh-mime-handler: also
diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env
new file mode 100644
index 000000000..263818627
--- /dev/null
+++ b/Completion/Unix/Command/_env
@@ -0,0 +1,12 @@
+#compdef env
+
+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'
+else
+  _precommand
+fi
diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand
index 2314b90b7..535c18260 100644
--- a/Completion/Zsh/Command/_precommand
+++ b/Completion/Zsh/Command/_precommand
@@ -1,4 +1,4 @@
-#compdef - nohup env eval time rusage noglob nocorrect exec catchsegv
+#compdef - nohup eval time rusage noglob nocorrect exec catchsegv
 
 shift words
 (( CURRENT-- ))