summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-29 08:59:48 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-29 08:59:48 +0000
commit32f8d43b61e357d38a3bf4f6a5bf63b2aa547945 (patch)
tree8a66e8905c8de8160f725aafc3df4e60993c510f
parent2249e5c319219a2a4d99b8439d4be511642cd9ec (diff)
downloadzsh-32f8d43b61e357d38a3bf4f6a5bf63b2aa547945.tar.gz
zsh-32f8d43b61e357d38a3bf4f6a5bf63b2aa547945.zip
fix comparison of expansions with expanded prefix (missing quoting) (13833)
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Core/_expand2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 244f0bc8f..2e478b7d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-03-29 Sven Wischnowsky <wischnow@zsh.org>
+ * 13833: Completion/Core/_expand: fix comparison of expansions
+ with expanded prefix (missing quoting)
+
* 13830: Completion/Core/_multi_parts: next try to get rid of
empty strings being added as possible completion by
_multi_parts
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index 81ca913ba..4835e4efc 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -93,7 +93,7 @@ if [[ "$word" = [\~\$]*/* && "$tmp" = (yes|true|on|1|changed) ]]; then
eval 'epre=( ${(e)~${word%%/*}} )' 2>/dev/null
if [[ -n "$epre" && $#epre -eq 1 ]]; then
opre="${word%%/*}"
- pre="$epre[1]"
+ pre="${(q)epre[1]}"
[[ "$tmp" != changed || $#exp -gt 1 ||
"${opre}${exp[1]#${pre}}" != "$word" ]] && exp=( ${opre}${^exp#${pre}} )
fi