From d8b124272387ac306b75ac304d34543fab907326 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sat, 7 Aug 2004 15:27:07 +0000 Subject: 20236: fix problem with keep-prefix style where a modifier removes the prefix --- ChangeLog | 3 +++ Completion/Base/Completer/_expand | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b8be10d..ffefb642b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-08-07 Oliver Kiddle + * 20236: Completion/Base/Completer/_expand: fix problem with + keep-prefix style where a modifier changes or removes the prefix + * 20235: Completion/Unix/Command/_rsync: synched remote file completion with that in _ssh. quoting needed quoting. 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 -- cgit 1.4.1