about summary refs log tree commit diff
path: root/Completion/Core/_setup
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-06 11:39:12 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-06 11:39:12 +0000
commitbb93d135ba484cd423ae71b1686c63ac2c1c654f (patch)
treeea3a27c4f3a5855eb3c176ad322c2d9e225e9d9d /Completion/Core/_setup
parentfb5a1bc4dce28016a61eb11033bfb9a23ea74b5e (diff)
downloadzsh-bb93d135ba484cd423ae71b1686c63ac2c1c654f.tar.gz
zsh-bb93d135ba484cd423ae71b1686c63ac2c1c654f.tar.xz
zsh-bb93d135ba484cd423ae71b1686c63ac2c1c654f.zip
zsh-workers/8911
Diffstat (limited to 'Completion/Core/_setup')
-rw-r--r--Completion/Core/_setup56
1 files changed, 47 insertions, 9 deletions
diff --git a/Completion/Core/_setup b/Completion/Core/_setup
index f12c34b34..683757918 100644
--- a/Completion/Core/_setup
+++ b/Completion/Core/_setup
@@ -1,13 +1,51 @@
 #autoload
 
-local colors i
+local val
 
-for i; do
-  if _style -a "$i" list-colors colors; then
-    if [[ "$1" = default ]]; then
-      ZLS_COLORS="${(j.:.)${(@)colors:gs/:/\\\:}}"
-    else
-      eval "ZLS_COLORS=\"(${i})\${(j.:(${i}).)\${(@)colors:gs/:/\\\:}}:\${ZLS_COLORS}\""
-    fi
+if _style -a "$1" list-colors val; then
+  if [[ "$1" = default ]]; then
+    ZLS_COLORS="${(j.:.)${(@)val:gs/:/\\\:}}"
+  else
+    eval "ZLS_COLORS=\"(${i})\${(j.:(${i}).)\${(@)val:gs/:/\\\:}}:\${ZLS_COLORS}\""
   fi
-done
+fi
+
+if _style -s "$1" list-packed val; then
+  if [[ "$val" = (yes|true|1|on) ]]; then
+    compstate[list]="${compstate[list]} packed"
+  else
+    compstate[list]="${compstate[list]:gs/packed//}"
+  fi
+else
+  compstate[list]="$_saved_list"
+fi
+
+if _style -s "$1" list-rows-first val; then
+  if [[ "$val" = (yes|true|1|on) ]]; then
+    compstate[list]="${compstate[list]} rows"
+  else
+    compstate[list]="${compstate[list]:gs/rows//}"
+  fi
+else
+  compstate[list]="$_saved_list"
+fi
+
+if _style -s "$1" last-prompt val; then
+  if [[ "$val" = (yes|true|1|on) ]]; then
+    compstate[last_prompt]=yes
+  else
+    compstate[last_prompt]=''
+  fi
+else
+  compstate[last_prompt]="$_saved_lastprompt"
+fi
+
+if _style -s "$1" accept-exact val; then
+  if [[ "$val" = (yes|true|1|on) ]]; then
+    compstate[exact]=accept
+  else
+    compstate[exact]=''
+  fi
+else
+  compstate[exact]="$_saved_exact"
+fi