summary refs log tree commit diff
path: root/Completion/Zsh/Context
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2016-09-16 00:00:28 +0200
committerOliver Kiddle <opk@zsh.org>2016-09-16 00:00:28 +0200
commitfbafc5b509e311efee064bbd12396a2e207f3393 (patch)
tree9fdf8f236fb1d25b54079e81cf75bf05eeca0b26 /Completion/Zsh/Context
parent00708285e94ce42a31fd59bbcd06d010a6d0d6ee (diff)
downloadzsh-fbafc5b509e311efee064bbd12396a2e207f3393.tar.gz
zsh-fbafc5b509e311efee064bbd12396a2e207f3393.tar.xz
zsh-fbafc5b509e311efee064bbd12396a2e207f3393.zip
39332: support ksh's [[ -v varname ]] condition for checking if variables are set
Diffstat (limited to 'Completion/Zsh/Context')
-rw-r--r--Completion/Zsh/Context/_condition3
1 files changed, 3 insertions, 0 deletions
diff --git a/Completion/Zsh/Context/_condition b/Completion/Zsh/Context/_condition
index 6f5e601f0..0285911ac 100644
--- a/Completion/Zsh/Context/_condition
+++ b/Completion/Zsh/Context/_condition
@@ -8,6 +8,8 @@ elif [[ "$prev" = -([a-hkprsuwxLOGSN]|[no]t|ef) ]]; then
   _tags -C "$prev" files && _files
 elif [[ "$prev" = -t ]]; then
   _file_descriptors
+elif [[ "$prev" = -v ]]; then
+  _parameters -r "\= \t\n\[\-"
 else
   if [[ "$PREFIX" = -* ]] ||
      ! zstyle -T ":completion:${curcontext}:options" prefix-needed; then
@@ -30,6 +32,7 @@ else
 	           -s:non-empty\ file
 	           -t:terminal\ file\ descriptor
 	           -u:setuid\ bit
+		   -v:set\ variable
 	           -w:writable\ file
 	           -x:executable\ file
 	           -z:empty\ string