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 +++++++++++++--- Doc/Zsh/compsys.yo | 3 ++- 2 files changed, 15 insertions(+), 4 deletions(-) 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[@]" ) diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index d59a1798e..c2ae6f7af 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -1195,7 +1195,8 @@ expansions). item(tt(special-dirs))( Normally, the completion code will not produce the directory names tt(.) and tt(..) as possible completions. If this style is set to -`true', it will. +`true', it will add both `tt(.)' and `tt(..)' as possible completions, +if it is set to tt(..), only `tt(..)' will be added. ) item(tt(stop))( If set to `true', the tt(_history_complete_word) bindable -- cgit 1.4.1