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_files3
1 files changed, 2 insertions, 1 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 3ddc62f94..377b9b7d0 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -293,7 +293,8 @@ for prepath in "$prepaths[@]"; do
       else
         tmp1=( ${^tmp1}${skipped}${^~pats} )
       fi
-      if [[ "$sopt" = *[/f]* && ( -o globdots || "$PREFIX" = .* ) ]] &&
+      if [[ ( "$sopt" = *[/f]* || "$pats" = *\([^[:blank:]]#/[^[:blank:]]#\)* ) &&
+            ( -o globdots || "$PREFIX" = .* ) ]] &&
 	  zstyle -s ":completion:${curcontext}:paths" special-dirs atmp; then
 	if [[ "$atmp" = (yes|true|1|on) ]]; then
 	  tmp1=( "$tmp1[@]" . .. )