about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_path_files9
-rw-r--r--Completion/Core/compdump6
2 files changed, 12 insertions, 3 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files
index 019e3abcf..04f4f1db3 100644
--- a/Completion/Core/_path_files
+++ b/Completion/Core/_path_files
@@ -260,7 +260,14 @@ for prepath in "$prepaths[@]"; do
       # original string in such a case so that the command line doesn't 
       # change but other completers still think there are matches.
 
-      if [[ -z "$tpre$tsuf" && "$pre" = */ && -z "$suf" ]]; then
+      # Problem:  this seems to stop _files from finding directory
+      # completions if there were no file completions, for
+      # example `_files *(*)' no longer completes subdirectories after
+      # a /.  For now, make this a configuration option, but
+      # probably it needs to be done better.
+
+      if [[ -n "$compconfig[path_keepdir]" && -z "$tpre$tsuf" &&
+	"$pre" = */ && -z "$suf" ]]; then
         compadd -nQS '' - "$linepath$donepath$orig"
         tmp4=-
       fi
diff --git a/Completion/Core/compdump b/Completion/Core/compdump
index f2729acc5..8f8a3ee77 100644
--- a/Completion/Core/compdump
+++ b/Completion/Core/compdump
@@ -17,10 +17,10 @@ emulate -L zsh
 
 typeset _d_file _d_f _d_bks _d_line _d_als
 
-_d_file=${compconfig[dumpfile]-${0:h}/compinit.dump}
+_d_file=${compconfig[dumpfile]-${0:h}/compinit.dump}.$HOST.$$
 
 typeset -U _d_files
-_d_files=( ${^~fpath}/_(|*[^~])(N:t) )
+_d_files=( ${^~fpath:/.}/_(|*[^~])(N:t) )
 
 print "#files: $#_d_files" > $_d_file
 
@@ -88,5 +88,7 @@ done >> $_d_file
 
 print >> $_d_file
 
+mv $_d_file ${_d_file%.$HOST.$$}
+
 unfunction compdump
 autoload -U compdump