summary refs log tree commit diff
path: root/Completion/Base/Completer
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2004-08-07 15:27:07 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2004-08-07 15:27:07 +0000
commitd8b124272387ac306b75ac304d34543fab907326 (patch)
tree952b16143144b410c476f20dab6e80993899cab3 /Completion/Base/Completer
parent0172512966f4cc518b58dac5743c31e881927f38 (diff)
downloadzsh-d8b124272387ac306b75ac304d34543fab907326.tar.gz
zsh-d8b124272387ac306b75ac304d34543fab907326.tar.xz
zsh-d8b124272387ac306b75ac304d34543fab907326.zip
20236: fix problem with keep-prefix style where a modifier removes the prefix
Diffstat (limited to 'Completion/Base/Completer')
-rw-r--r--Completion/Base/Completer/_expand5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand
index a71c7d34b..52d47b2d7 100644
--- a/Completion/Base/Completer/_expand
+++ b/Completion/Base/Completer/_expand
@@ -133,8 +133,9 @@ if [[ "$word" = (\~*/*|*\$*/*) && "$tmp" = (yes|true|on|1|changed) ]]; then
 
   if [[ -n "$epre" && $#epre -eq 1 ]]; then
     pre="${(q)epre[1]}"
-    [[ "$tmp" != changed || $#exp -gt 1 ||
-       "${opre}${exp[1]#${pre}}" != "$word" ]] && exp=( ${opre}${^exp#${pre}} )
+    [[ ( "$tmp" != changed || $#exp -gt 1 ||
+       "${opre}${exp[1]#${pre}}" != "$word" ) && "${exp[1]}" = $pre* ]] &&
+       exp=( ${opre}${^exp#${pre}} )
   fi
   [[ $#exp -eq 1 && "$exp[1]" = "$word" ]] && return 1
 fi