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

Re: [PATCH] internal: quotestring: Drop the 'e' parameter, which no caller uses.



On Sun, 11 Sep 2016 07:27:24 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Somewhat related, I don't understand the purpose of tildequote().  I could
> document it as follows:
> 
> /*
>  * tildequote(s, ign): Equivalent to multiquote(s, ign), except that if
>  * compqstack[0] == QT_BACKSLASH and s[0] == '~', then that tilde is not
>  * quoted.
>  */

The basic idea here is that completion leaves ~'s for named directory
expansion alone, even though every other character is supposed to
represent a literal by appropriate quoting, so that to insert a quoted
string from within completion a leading ~ actually needs not to be
quoted.

How this is used I don't remember, so it's perfectly possible, as always
with the completion system, that you're encountering anomalies.  As far
as I know there's no useful case of not quoting a non-leading tilde.

pws



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