1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

zsh-workers/8565

This commit is contained in:
Tanaka Akira 1999-11-05 14:04:17 +00:00
parent b6f8ff697f
commit bb0ed70d29
2 changed files with 7 additions and 3 deletions

View file

@ -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"

View file

@ -3073,7 +3073,7 @@ bslashquote(const char *s, char **e, int instring)
}
continue;
}
else if (ispecial(*u) &&
else if (ispecial(*u) && (*u != '=' || u == s) &&
(!instring ||
(isset(BANGHIST) && *u == (char)bangchar) ||
(instring == 2 &&