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_files9
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 6f21ea6ef..077c2608b 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -210,10 +210,15 @@ for prepath in "$prepaths[@]"; do
     # Get the matching files by globbing.
 
     if [[ "$tpre$tsuf" = */* ]]; then
-      tmp1=( ${^tmp1}*(-/) )
+      tmp2=( ${^tmp1}*(-/) )
+      [[ ! -o globdots && "$PREFIX" = .* ]] &&
+          tmp2=( "$tmp1[@]" ${^tmp1}.*(-/) )
     else
-      tmp1=( ${^tmp1}${^~pats} )
+      tmp2=( ${^tmp1}${^~pats} )
+      [[ ! -o globdots && "$PREFIX" = .* ]] &&
+          tmp2=( "$tmp1[@]" ${^tmp1}.${^~pats} )
     fi
+    tmp1=( "$tmp2[@]" )
 
     if [[ -n "$PREFIX$SUFFIX" ]]; then
       # See which of them match what's on the line.