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

RE: PATCH: Re: _match still does not work in _path_files



Andrej Borsenkow wrote:

> Compare:
> 
> bor@itsrm2:/tools/src/zsh-cvs/zsh%> zsh -f
> ...
> itsrm2% ls /t/s/z/f*/_<TAB>
> beeps
> 
> but
> 
> bor@itsrm2:/tools/src/db-2.7.7/build_unix%> zsh-3.1.6 -f
> ...
> itsrm2% ls /t/s/z/f*/_<TAB>
> itsrm2% ls /tools/share/zsh/functions<CURSOR>/_
> functions/      functions.old/
> 
> with TAB cycling between functions and functions.old
> 
> It is much worse actually; in the above setup as simple as
> 
> itsrm2% ls /t/s/z/f/_<TAB>
> 
> does not work - it beeps. In 3.1.6 pure I at least get both functions and
> functions.old listed (I am still not quite happy with what happens after the
> second TAB ...)

There was a bug which should be fixed by the patch below. However, the 
rest of what I said the last time when you brought this up is still
valid.

Bye
 Sven

diff -u oldcompletion/Core/_path_files Completion/Core/_path_files
--- oldcompletion/Core/_path_files	Mon Nov  1 09:03:02 1999
+++ Completion/Core/_path_files	Tue Nov  2 15:50:27 1999
@@ -316,7 +316,7 @@
       # collected as the suffixes to make the completion code expand
       # it as far as possible.
 
-      if [[ "$tsuf" = */* ]]; then
+      if [[ "$tpre" = */* ]]; then
         PREFIX="${donepath}${linepath}${cpre}${tpre%%/*}"
 	SUFFIX="/${tsuf#*/}"
       else
@@ -390,8 +390,8 @@
   done
 
   if [[ -z "$tmp4" ]]; then
-    PREFIX="${opre}"
-    SUFFIX="${osuf}"
+    PREFIX="${opre}${osuf}"
+    SUFFIX=""
     compadd -Qf -p "$linepath${testpath:q}" \
 	    -W "$prepath$realpath$testpath" "$ignore[@]" \
 	    "$addpfx[@]" "$addsfx[@]" "$remsfx[@]" \

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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