Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] internal: quotestring: Drop the 'e' parameter, which no caller uses.
- X-seq: zsh-workers 39271
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] internal: quotestring: Drop the 'e' parameter, which no caller uses.
- Date: Sun, 11 Sep 2016 07:27:24 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=JNdA6p9Hy28Op0wp1l3C+LMIkuA=; b=fCjBdt uQ+2LQ3pvFzJIkH2rhVOgeTzw74zGsdTOw/GrSSGNiKvYdQ8SvZS7B5P/A630N5g cdDkc4hyE4gHD7wItk7dEKHaSbhab1ZmuO5mRfMlSfTJ7Hh71YWjHdg8nmC0FvhC hBaeHbvV0ekqRWST1JNvxSGQitATTZ8Pp/HCA=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=JNdA6p9Hy28Op0wp1l3C+LMIkuA=; b=BLYt/ PqjEQ4elwbWZ0r+KOdPpmLRL2BdVPX8FqbReruwkZnUk1mAMLbMFjzyUp/L3l+jg xWivo9T4hMRIBXoAHVLFuU2f3U1jYUDuAsNHbgPW803fyV8HJ4AB2Tvo9zOTXWOv aQ9L2RT/7FoQ1JLis/SbVl+IfPO3ozvpGnjFeU=
- In-reply-to: <160909220003.ZM20317@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1473413886-28755-1-git-send-email-danielsh@fujitsu.shahaf.local2> <160909220003.ZM20317@torch.brasslantern.com>
Bart Schaefer wrote on Fri, Sep 09, 2016 at 22:00:03 -0700:
> Recall what I've said in a couple of other threads about it being too
> hard for completion to intuit what a user means to have remain quoted
> and what he expects completion to expand or otherwise treat as unquoted?
> The need for this "e" argument seems to have gone away when we decided
> to give up and do minimal quote interpretation/insertion.
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.
*/
Which I'm having trouble getting my head around: when would it be a good
idea to decide whether to quote ~ or not based on what _kind_ of quoting
the user happened to use?
Example:
1 % _f() { compset -q; compadd -f '~/foo foo' }
2 % compdef _f f
3 % f \~/foo<TAB> # becomes ~/foo\\\ foo
4 % f '~/foo<TAB> # becomes '~/foo\ foo
Lines 3 and 4 both start with a quoted tilde, but one of them ends with
a quoted tilde and the other with an unquoted tilde.
This seems to be an intentional feature since if tildequote() were
changed to escape the tilde even in the QT_BACKSLASH case, it would be
synonymous with multiquote().
> I don't know what this patch accomplishes other than some dead code
> removal, but I guess there's no remaining reason not to commit it.
>
Thanks for the inestigation and patch review.
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author