From 8cb0bdc6a089e3ca58af81dffe4695b45a4cc04e Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 14 Dec 1999 09:27:09 +0000 Subject: zsh-workers/9031 --- Completion/Core/_path_files | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Completion/Core') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index cafec3c09..bbed17a1f 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -226,16 +226,26 @@ for prepath in "$prepaths[@]"; do tmp2=( ${^tmp1}*(-/) ) if [[ ! -o globdots && "$PREFIX" = .* ]]; then tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) ) - zstyle -t ":completion${curcontext}:paths" special-dirs && + 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 + fi fi else tmp2=( ${^tmp1}${^~pats} ) if [[ ! -o globdots && "$PREFIX" = .* ]]; then tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} ) - [[ "$sopt" = */* ]] && - zstyle -t ":completion${curcontext}:paths" special-dirs && + 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 + fi fi fi tmp1=( "$tmp2[@]" ) -- cgit 1.4.1