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

Re: Completion lockup



"Mikael Magnusson" wrote:
> The only funny thing I've noticed in the past 5 minutes
> is that if i type a''''<tab> i get the file as a\'foobar, but if i
> leave out the a and
> just tab the four quotes, i get it in the command line as 'a''foobar' which
> seems weird, but maybe the _correct (i think?) completer does things
> differently. This is not something that bothers me in the least, just thought
> i should mention it.

The code that handles quotes in completion is gruesome (and includes, in
case you hadn't guessed, the most horrible function ever written,
too---that's the one that deals with nested quotes when something inside
quotes is to be treated as a command line in its own right).  One of its
tricks is that it makes some kind of guess early on how to quote the
line.  If there's a ' at the start it will use ' quoting and if there
isn't it will use backslash quoting.  It doesn't make much attempt to
keep the form of quotes it started off with.  Typically this is a pretty
reasonable guess.

You'd see this if the test file was called \'foobar and you typed
'''f<TAB>.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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