PATCH: restore environment variable completion to env

Oliver Kiddle <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <[email protected]>
In 52037, the invocation of _normal from _env was changed to complete
only external commands. What this missed is that it was relying on
_normal to complete environment variable assignments too. The following
adds back completion of environment variables.

Oliver

diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env
index b9094339e..6173394e0 100644
--- a/Completion/Unix/Command/_env
+++ b/Completion/Unix/Command/_env
@@ -69,7 +69,9 @@ if [[ -n $state ]]; then
         shift words
         (( CURRENT-- ))
       done
-      _normal -p env && ret=0
+      _alternative \
+        'parameters:environment variable:_parameters -g "*export*" -qS=' \
+        'normal:: _normal -p env' && ret=0
     ;;
     user-class)
       if compset -P 1 '*/'; then
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.