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

PATCH: restore environment variable completion to env



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




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