Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] env completion: add missing explanation of --unset option, fixes alignment of completed arguments



---
 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*]}' \
     '--help[help]' \
     '--version[version]' \
     '*::arguments: _normal'
-- 
1.6.5.2.351.g0943



Messages sorted by: Reverse Date, Date, Thread, Author