about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2006-04-13 02:46:50 +0000
committerClint Adams <clint@users.sourceforge.net>2006-04-13 02:46:50 +0000
commitc9a761df01cba44f7f2f14cb97af7dedd6fdb8e9 (patch)
tree5878e1b62b7764c1c90d1270dc3f2e1313facd7a
parent9491c3c754b4fcd1271d98c3eee6fb702e05ae5e (diff)
downloadzsh-c9a761df01cba44f7f2f14cb97af7dedd6fdb8e9.tar.gz
zsh-c9a761df01cba44f7f2f14cb97af7dedd6fdb8e9.tar.xz
zsh-c9a761df01cba44f7f2f14cb97af7dedd6fdb8e9.zip
22418: completion for GNU env.
-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-- ))