about summary refs log tree commit diff
path: root/Completion/Core/_expand
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-05 14:04:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-05 14:04:17 +0000
commitbb0ed70d2972319ff1abcdc0f9a62fa179b01a16 (patch)
tree7a7f9521e8f4e75756a2a4455966fe915976998f /Completion/Core/_expand
parentb6f8ff697ff4583983a7e8818202191e14825a57 (diff)
downloadzsh-bb0ed70d2972319ff1abcdc0f9a62fa179b01a16.tar.gz
zsh-bb0ed70d2972319ff1abcdc0f9a62fa179b01a16.tar.xz
zsh-bb0ed70d2972319ff1abcdc0f9a62fa179b01a16.zip
zsh-workers/8565
Diffstat (limited to 'Completion/Core/_expand')
-rw-r--r--Completion/Core/_expand8
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index 9f083338e..df9e0b9ea 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -77,6 +77,10 @@ else
   expl2=(-n)
 fi
 
+# Quote the results and remove unnecessary quotes before `='s.
+
+    exp=( "${(@)${(@)${(@q)exp}//\\\\=/=}/#=/\\=}" )
+
 # We have expansions, should we menucomplete them?
 
 if [[ -z "$compconfig[expand_menu]" ]]; then
@@ -112,7 +116,7 @@ else
      "$compconfig[expand_original]" != *last* ]] &&
       compadd "$expl[@]" -UQ -V _expand_original - "$word"
 
-  [[ "$compconfig[expand_menu]" = *last* &&
+  [[ $#exp -ne 1 && "$compconfig[expand_menu]" = *last* &&
      "$compconfig[expand_menu]" != *only* ]] &&
       compadd "$expl2[@]" -UQ -V _expand_all - "$exp"
 
@@ -122,7 +126,7 @@ else
     compadd -UQ -X "${compconfig[expand_prompt]//\\%o/$word}" \
             $group _expand - "$exp[@]"
   fi
-  [[ "$compconfig[expand_menu]" != *last* &&
+  [[ $#exp -ne 1 && "$compconfig[expand_menu]" != *last* &&
      "$compconfig[expand_menu]" != *only* ]] &&
       compadd "$expl2[@]" -UQ -V _expand_all - "$exp"