about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-14 09:27:09 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-14 09:27:09 +0000
commit8cb0bdc6a089e3ca58af81dffe4695b45a4cc04e (patch)
tree2902eab15d02fa9c1da34a63a43760bb670095d7
parent4e49d209a6862adba5eb36cff20acc635b29b2dd (diff)
downloadzsh-8cb0bdc6a089e3ca58af81dffe4695b45a4cc04e.tar.gz
zsh-8cb0bdc6a089e3ca58af81dffe4695b45a4cc04e.tar.xz
zsh-8cb0bdc6a089e3ca58af81dffe4695b45a4cc04e.zip
zsh-workers/9031
-rw-r--r--Completion/Core/_path_files16
-rw-r--r--Doc/Zsh/compsys.yo3
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