From bb0ed70d2972319ff1abcdc0f9a62fa179b01a16 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 5 Nov 1999 14:04:17 +0000 Subject: zsh-workers/8565 --- Completion/Core/_expand | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Completion/Core/_expand') 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" -- cgit 1.4.1