From 4f2474fbf4f0ae8637b2a4d29a285ed94cc6a31b Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 18 Jan 2000 10:01:55 +0000 Subject: zsh-workers/9335 --- Completion/Core/_path_files | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 79cf3804f..a53c5e10d 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -264,27 +264,26 @@ for prepath in "$prepaths[@]"; do if [[ "$tpre$tsuf" = */* ]]; then tmp2=( ${^tmp1}*(-/) ) - if [[ ! -o globdots && "$PREFIX" = .* ]]; then - tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) ) - if zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then - if [[ "$atmp" = (yes|true|1|on) ]]; then - tmp2=( "$tmp2[@]" . .. ) - elif [[ "$atmp" = .. ]]; then - tmp2=( "$tmp2[@]" .. ) - fi + [[ ! -o globdots && "$PREFIX" = .* ]] && + tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) ) + if [[ -o globdots || "$PREFIX" = .* ]] && + zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then + if [[ "$atmp" = (yes|true|1|on) ]]; then + tmp2=( "$tmp2[@]" . .. ) + elif [[ "$atmp" = .. ]]; then + tmp2=( "$tmp2[@]" .. ) fi fi else tmp2=( ${^tmp1}${^~pats} ) - if [[ ! -o globdots && "$PREFIX" = .* ]]; then - tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} ) - if [[ "$sopt" = */* ]] && - zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then - if [[ "$atmp" = (yes|true|1|on) ]]; then - tmp2=( "$tmp2[@]" . .. ) - elif [[ "$atmp" = .. ]]; then - tmp2=( "$tmp2[@]" .. ) - fi + [[ ! -o globdots && "$PREFIX" = .* ]] && + tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} ) + if [[ "$sopt" = *[/f]* && ( -o globdots || "$PREFIX" = .* ) ]] && + zstyle -s ":completion${curcontext}:paths" special-dirs atmp; then + if [[ "$atmp" = (yes|true|1|on) ]]; then + tmp2=( "$tmp2[@]" . .. ) + elif [[ "$atmp" = .. ]]; then + tmp2=( "$tmp2[@]" .. ) fi fi fi -- cgit 1.4.1