From 53d36e795b26a945048e7a87a1a91224f8e1663a Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sun, 2 May 1999 15:19:50 +0000 Subject: zsh-3.1.5-pws-17 --- Completion/Core/_path_files | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'Completion/Core/_path_files') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index ed799be84..16666909b 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -230,14 +230,15 @@ for prepath in "$prepaths[@]"; do if [[ -n "$PREFIX$SUFFIX" ]]; then # See which of them match what's on the line. - compadd -O tmp2 "$ignore[@]" - "${(@)tmp1##*/}" + tmp2=("$tmp1[@]") + compadd -D tmp1 "$ignore[@]" - "${(@)tmp1##*/}" # If no file matches, save the expanded path and continue with # the outer loop. - if [[ $#tmp2 -eq 0 ]]; then - if [[ "$tmp1[1]" = */* ]]; then - tmp2=( "${(@)tmp1#${prepath}${realpath}}" ) + if [[ $#tmp1 -eq 0 ]]; then + if [[ "$tmp2[1]" = */* ]]; then + tmp2=( "${(@)tmp2#${prepath}${realpath}}" ) if [[ "$tmp2[1]" = */* ]]; then exppaths=( "$exppaths[@]" ${^tmp2%/*}/${tpre}${tsuf} ) else @@ -246,14 +247,6 @@ for prepath in "$prepaths[@]"; do fi continue 2 fi - - # Remove all files that weren't matched. - - if [[ "$tmp1[1]" = */* ]]; then - tmp1=( "${(@M)tmp1:#*/(${(j:|:)~${(@)tmp2:q}})}" ) - else - tmp1=( "${(@M)tmp1:#(${(j:|:)~${(@)tmp2:q}})}" ) - fi elif (( ! $#tmp1 )); then continue 2 fi -- cgit 1.4.1