about summary refs log tree commit diff
path: root/Completion/Core/_expand
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-03 16:46:56 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-03 16:46:56 +0000
commit17f0c30d462386010284b2da03f0f108ca7d5114 (patch)
tree9db58aceda357b10d2af1b8cce53152fadb17d75 /Completion/Core/_expand
parent208ddbc3e8ee7f937171927869a17bd4ef882ff1 (diff)
downloadzsh-17f0c30d462386010284b2da03f0f108ca7d5114.tar.gz
zsh-17f0c30d462386010284b2da03f0f108ca7d5114.tar.xz
zsh-17f0c30d462386010284b2da03f0f108ca7d5114.zip
manual/8876
Diffstat (limited to 'Completion/Core/_expand')
-rw-r--r--Completion/Core/_expand22
1 files changed, 12 insertions, 10 deletions
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index e611dc3e2..7598b6f88 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -82,7 +82,9 @@ fi
 
 # Quote the results and remove unnecessary quotes before `='s.
 
-    exp=( "${(@)${(@)${(@q)exp}//\\\\=/=}/#=/\\=}" )
+exp=( "${(@)${(@)${(@q)exp}//\\\\=/=}/#=/\\=}" )
+
+_setup original expansions all-expansions
 
 # We have expansions, should we menucomplete them?
 
@@ -93,15 +95,15 @@ if [[ -z "$menu" ]]; then
   # probably also adding the original string.
 
   if [[ -z "$compstate[insert]" ]]; then
-    compadd -U -V _expand -Q - "$exp[@]"
+    compadd -U -V all-expansions -Q - "$exp[@]"
   else
     [[ -n "$orig" && "$orig" != *last* ]] &&
-        compadd "$expl[@]" -UQ -V _expand_original - "$word"
+        compadd "$expl[@]" -UQ -V original - "$word"
 
     compadd -UQ -V _expand - "$exp"
 
     [[ -n "$orig" && "$orig" = *last* ]] &&
-        compadd "$expl[@]" -UQ -V _expand_original - "$word"
+        compadd "$expl[@]" -UQ -V original - "$word"
 
     compstate[insert]=menu
   fi
@@ -114,22 +116,22 @@ else
   # and/or the string containing all expanded string.
 
   [[ -n "$orig" && "$orig" != *last* ]] &&
-      compadd "$expl[@]" -UQ -V _expand_original - "$word"
+      compadd "$expl[@]" -UQ -V original - "$word"
 
   [[ $#exp -ne 1 && "$menu" = *last* && "$menu" != *only* ]] &&
-      compadd "$expl2[@]" -UQ -V _expand_all - "$exp"
+      compadd "$expl2[@]" -UQ -V all-expansions - "$exp"
 
   if [[ -z "$prompt" ]]; then
-    compadd -UQ $group _expand - "$exp[@]"
+    compadd -UQ $group expansions - "$exp[@]"
   else
     compadd -UQ -X "${prompt//\\%o/$word}" \
-            $group _expand - "$exp[@]"
+            $group expansions - "$exp[@]"
   fi
   [[ $#exp -ne 1 && "$menu" != *last* && "$menu" != *only* ]] &&
-      compadd "$expl2[@]" -UQ -V _expand_all - "$exp"
+      compadd "$expl2[@]" -UQ -V all-expansions - "$exp"
 
   [[ -n "$orig" && "$orig" = *last* ]] &&
-      compadd "$expl[@]" -UQ -V _expand_original - "$word"
+      compadd "$expl[@]" -UQ -V original - "$word"
 
   compstate[insert]=menu
 fi