Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _files -g and subdirectory completion



Alexandre Duret-Lutz wrote:

> What's happening with _files -g ?  I am missing a new style ?
> 
> ~/tmp/m1 % zsh -f
> phobos% autoload -U compinit
> phobos% compinit
> phobos% mkdir -p foo/bar
> phobos% zcat foo/<TAB>
> 
> Nothing complete. It behaves like this with all completions 
> functions using _files -g.

Yep. That break in _path_files already irritated me some time
ago. Let's try without it...


I'm awfully sorry about all this mess with file completion. Sigh.

Bye
 Sven

diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files
--- ../z.old/Completion/Core/_path_files	Mon Feb 28 12:01:23 2000
+++ Completion/Core/_path_files	Mon Feb 28 12:52:20 2000
@@ -346,9 +346,13 @@
       # if none of the patterns match.
 
       if [[ -z "$tpre$tsuf" && -n "$pre$suf" ]]; then
-        tmp1=( "$tmp2[@]" )
 	pfxsfx=(-S '' "$pfxsfx[@]")
-	break
+	### Don't remember what the break was good for. We explicitly
+	### execute this only when there are no matches in the directory,
+	### so why continue?
+	###
+        ### tmp1=( "$tmp2[@]" )
+	### break
       elif [[ "$haspats" = no && -z "$tpre$tsuf" &&
 	"$pre" = */ && -z "$suf" ]]; then
 	PREFIX="${opre}"

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author