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

20236: fix problem with keep-prefix style where a modifier removes the prefix

This commit is contained in:
Oliver Kiddle 2004-08-07 15:27:07 +00:00
parent 0172512966
commit d8b1242723
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2004-08-07 Oliver Kiddle <opk@zsh.org>
* 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.

View file

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