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

PATCH: Re: Correction of files after ~/

Peter Stephenson wrote:

> Correction/approximation of filenames which begin with a `~' appears to be
> broken.  I think this has happened before.  I'm not aware of any styles I
> have that would affect this (note careful phrasing).

This was dependend on the matchers one used.  Complicated ones could
lead _path_files to end up with the uncorrected word as an `expanded'
path which made _path_files return zero...

> Could somebody who understands this put some tests with leading ~'s into
> the completion part of the test suite?

Since this was really caused by ~ being expanded to the home directory 
I'm not sure how to do that.


Index: Completion/Core/_path_files
RCS file: /cvsroot/zsh/zsh/Completion/Core/_path_files,v
retrieving revision 1.36
diff -u -r1.36 _path_files
--- Completion/Core/_path_files	2001/02/13 09:23:34	1.36
+++ Completion/Core/_path_files	2001/03/23 09:52:22
@@ -364,8 +364,10 @@
 	      exppaths=( "$exppaths[@]" ${^tmp2}/${tpre}${tsuf} )
-          else
+          elif [[ ${tpre}${tsuf} = */* ]]; then
 	    exppaths=( "$exppaths[@]" ${tpre}${tsuf} )
+	    ### this once was in an `else' (not `elif')
         continue 2

Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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