diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-04 14:57:19 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-04 14:57:19 +0000 |
commit | f71a7de56fa5fcc4b94f8e3a6344729511bd686d (patch) | |
tree | 479397c832980ab3b880ee45d9e57ea00e1b53bb /Completion/Core/_path_files | |
parent | d05db5e29f3798e398c11fc416b4c093b3ef8338 (diff) | |
download | zsh-f71a7de56fa5fcc4b94f8e3a6344729511bd686d.tar.gz zsh-f71a7de56fa5fcc4b94f8e3a6344729511bd686d.tar.xz zsh-f71a7de56fa5fcc4b94f8e3a6344729511bd686d.zip |
zsh-workers/9197
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r-- | Completion/Core/_path_files | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 9da2fdd81..55d0aefa9 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -265,8 +265,12 @@ for prepath in "$prepaths[@]"; do if [[ -n "$PREFIX$SUFFIX" ]]; then # See which of them match what's on the line. - tmp2=("$tmp1[@]") - compadd -D tmp1 "$ignore[@]" "$matcher[@]" - "${(@)tmp1:t}" + builtin compadd -D tmp1 "$ignore[@]" "$matcher[@]" - "${(@)tmp1:t}" + + if [[ $#tmp1 -eq 0 && -n "$_comp_correct" ]]; then + tmp1=( "$tmp2[@]" ) + compadd -D tmp1 "$ignore[@]" "$matcher[@]" - "${(@)tmp2:t}" + fi # If no file matches, save the expanded path and continue with # the outer loop. |