diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2008-10-15 06:10:02 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2008-10-15 06:10:02 +0000 |
commit | 3482e2dc8bea48fa7b94717de45dfeb8eff76156 (patch) | |
tree | b93c1071ce22a379434ccda049718df39510249a /Completion/Unix | |
parent | d6c692599f0838e9d6fe240ba958a7205042191b (diff) | |
download | zsh-3482e2dc8bea48fa7b94717de45dfeb8eff76156.tar.gz zsh-3482e2dc8bea48fa7b94717de45dfeb8eff76156.tar.xz zsh-3482e2dc8bea48fa7b94717de45dfeb8eff76156.zip |
25887: fix brace completion oddity by using compadd -U more selectively.
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Type/_path_files | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files index 864aec8b9..018a1ded8 100644 --- a/Completion/Unix/Type/_path_files +++ b/Completion/Unix/Type/_path_files @@ -7,7 +7,7 @@ local linepath realpath donepath prepath testpath exppath skips skipped local tmp1 tmp2 tmp3 tmp4 i orig eorig pre suf tpre tsuf opre osuf cpre local pats haspats ignore pfx pfxsfx sopt gopt opt sdirs ignpar cfopt listsfx local nm=$compstate[nmatches] menu matcher mopts sort mid accex fake -local listfiles listopts tmpdisp origtmp1 +local listfiles listopts tmpdisp origtmp1 Uopt integer npathcheck local -a match mbegin mend @@ -209,7 +209,7 @@ eorig="$orig" [[ $compstate[insert] = (*menu|[0-9]*) || -n "$_comp_correct" || ( -n "$compstate[pattern_match]" && "${orig#\~}" != (|*[^\\])[][*?#~^\|\<\>]* ) ]] && menu=yes -[[ -n "$_comp_correct" ]] && cfopt=- +[[ -n "$_comp_correct" ]] && cfopt=- Uopt=-U # Now let's have a closer look at the string to complete. @@ -612,7 +612,7 @@ for prepath in "$prepaths[@]"; do # back up the path. tmp1=("${(@)tmp1%%/*}") _list_files tmp1 "$prepath$realpath$testpath" - compadd -U -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ + compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ -s "/${tmp3#*/}$ISUFFIX" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ @@ -622,7 +622,7 @@ for prepath in "$prepaths[@]"; do # Same with a non-empty suffix tmp1=("${(@)^tmp1%%/*}/${tmp3#*/}") _list_files tmp1 "$prepath$realpath$testpath" - compadd -U -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ + compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ -s "$ISUFFIX" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ @@ -631,7 +631,7 @@ for prepath in "$prepaths[@]"; do fi else _list_files tmp1 "$prepath$realpath$testpath" - compadd -U -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ + compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ -s "$ISUFFIX" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ @@ -661,7 +661,7 @@ for prepath in "$prepaths[@]"; do fi else _list_files tmp1 "$prepath$realpath$testpath" - compadd -U -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ + compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp2" \ -s "$ISUFFIX" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" \ @@ -730,7 +730,7 @@ for prepath in "$prepaths[@]"; do compquote tmp4 tmp2 tmp1 for i in "$tmp1[@]"; do _list_files tmp2 "$prepath$realpath${mid%/*/}" - compadd -U -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp3/" \ + compadd $Uopt -Qf "$mopts[@]" -p "$IPREFIX$linepath$tmp3/" \ -s "/$tmp4$i$ISUFFIX" \ -W "$prepath$realpath${mid%/*/}/" \ "$pfxsfx[@]" $listopts - "$tmp2" @@ -761,7 +761,7 @@ for prepath in "$prepaths[@]"; do else # Not a pattern match _list_files tmp1 "$prepath$realpath$testpath" - compadd -U -Qf -p "$IPREFIX$linepath$tmp4" \ + compadd $Uopt -Qf -p "$IPREFIX$linepath$tmp4" \ -s "$ISUFFIX" \ -W "$prepath$realpath$testpath" \ "$pfxsfx[@]" "$mopts[@]" $listopts -a tmp1 |