Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion lockup
- X-seq: zsh-workers 24544
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Completion lockup
- Date: Sat, 09 Feb 2008 19:13:51 +0000
- In-reply-to: Message from "Mikael Magnusson" <mikachu@xxxxxxxxx> of "Sat, 09 Feb 2008 19:04:04 +0100." <237967ef0802091004r5ad42cecof46abb401b0f98cb@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
"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