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

Re: completion in quotes - " vs ' - no suffix added



В Пнд, 13.05.2002, в 21:33, Bart Schaefer написал:
> 
> On May 13,  2:14pm, Borsenkow Andrej wrote:
> }
> } I do not see any difference with this patch. As before, listing
> } pathnames with spaces in single quotes correctly adds slash to
> } directories and in double quotes adds nothing.
> 
> I see slashes getting added to directories in double quotes:
> 
> schaefer<505> ls        
> a\ b  a\ d/  don't stop/  rmthat/
> schaefer<506> ls "a<TAB><TAB>
> schaefer<506> ls "a\\
> Completing files
> a\\ d/  a\\ b 
> 
> And then going on:
> 
> schaefer<506> ls "a\\ <TAB>
> schaefer<506> ls "a\\ d/<TAB>
> schaefer<506> ls "a\\ b"
> 

Wrong example. My concern is

zsh -c "ls TAB"

It is _here_ it should escape spaces:

itsrm2% ls "
a b/       c d/       uudecode/

O.K. (just lists filenames verbatim) 

but
itsrm2% zsh -c "ls
a\\ b      c\\ d      uudecode/

wrong (upon dequoting of matches). Second TAB:

itsrm2% zsh -c "ls a\\ b
a\\ b      c\\ d      uudecode/

so correctly escaped filename is inserted but is not unquoted when
testing for file type.

> One oddity is that typing the closing quote after `ls "a\\ d/' does not
> auto-remove the slash, but I don't think that's strictly a bug.
>

May be it should; but then it becomes increasingly more complicated with
nested quotes. Besides, you may want to continue quoted word ...

-andrej



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