about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_path_files33
1 files 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