Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: restore environment variable completion to env
- X-seq: zsh-workers 54577
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: restore environment variable completion to env
- Date: Sun, 17 May 2026 02:34:49 +0200
- Archived-at: <https://zsh.org/workers/54577>
- List-id: <zsh-workers.zsh.org>
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