about summary refs log tree commit diff
path: root/Completion/Core/_path_files
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r--Completion/Core/_path_files15
1 files changed, 11 insertions, 4 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 993d0e89a..cafec3c09 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -224,12 +224,19 @@ for prepath in "$prepaths[@]"; do
 
     if [[ "$tpre$tsuf" = */* ]]; then
       tmp2=( ${^tmp1}*(-/) )
-      [[ ! -o globdots && "$PREFIX" = .* ]] &&
-          tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) . .. )
+      if [[ ! -o globdots && "$PREFIX" = .* ]]; then
+        tmp2=( "$tmp2[@]" ${^tmp1}.*(-/) )
+	zstyle -t ":completion${curcontext}:paths" special-dirs &&
+	    tmp2=( "$tmp2[@]" . .. )
+      fi
     else
       tmp2=( ${^tmp1}${^~pats} )
-      [[ ! -o globdots && "$PREFIX" = .* ]] &&
-          tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} . .. )
+      if [[ ! -o globdots && "$PREFIX" = .* ]]; then
+        tmp2=( "$tmp2[@]" ${^tmp1}.${^~pats} )
+        [[ "$sopt" = */* ]] &&
+	    zstyle -t ":completion${curcontext}:paths" special-dirs &&
+	    tmp2=( "$tmp2[@]" . .. )
+      fi
     fi
     tmp1=( "$tmp2[@]" )