Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: edit-command-line breaks out of vared
- X-seq: zsh-users 26014
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Subject: Re: edit-command-line breaks out of vared
- Date: Wed, 5 Aug 2020 13:12:47 +0200
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2020-08/CAHYJk3SedFT284vN2FVncJg-WBcKx%2BA3b2MReJR35wqpzTOPbw%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-il1-x143.google.com) smtp.remote-ip=2607:f8b0:4864:20::143; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256
- Cc: zsh-users@xxxxxxx, zsugabubus@national.shitposting.agency
- Delivery-date: Wed, 05 Aug 2020 11:15:37 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dultl1pjm4JCG9EixPgbn2xmCjVIcF6QnJUiICb6Dd8=; b=aUf00OUOJ+eXiRb1OLrMOItgF6VsWCBOrO9+4sNjXcLI2+8eyPcYMPat7kfL7Xk9JW iil0XUkfV2jL6L5wZbtptcHfZLhCgPhvsbfhWWFQBKkD5+5sL52fD9GaYeuUE6CkaTIM 5BB+q5LSl+2hrePUyLHsEFaFSti6ipoAQZc8ET6rwtRccR66LKra+6rI/Az22N7VY6FE 3uM7cPwpSmO+tlDYf3ZwGeoYcro86efYNGNaCcxtlvA9keFnRFSiHnboWpBIE+srPVX2 WsTdhJwYac2PTPDgf3Gk44UhNfJyLiZ3U66dZQ0vk4NUrbOvZikW5PtbuKc73cEfT5Tj grtw==
- Envelope-to: archives@xxxxxxxxxxxx
- In-reply-to: <1534769912.102537.1479915000.00485AFF@webmail.messagingengine.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-users>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-users.zsh.org>
- List-owner: <mailto:zsh-users-request@zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-users>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-users>
- References: <20180819122254.mgx2kfbnbsxxtuqk@tarpaulin.shahaf.local2> <CAHYJk3RBurSZJuFdzua5DPAU7rd2wvZX6tSAEtAXwD89-Fd_NQ@mail.gmail.com> <CAH+w=7aL3yswgM36XU_ehwa5ppH0zXw4qxCgCLiOwKRBH3XbnA@mail.gmail.com> <1534769912.102537.1479915000.00485AFF@webmail.messagingengine.com>
- Sender: Sympa Owner <sympa@xxxxxxx>
On 8/20/18, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Bart Schaefer wrote on Sun, 19 Aug 2018 12:03 -0700:
>> > On Sun, Aug 19, 2018 at 2:22 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
>> > wrote:
>> >>
>> >> I expected quitting the editor to let me resume the vared session
>>
>> My first inclination here is to ask why you expected that ...
>>
>> >> instead it left me with the variable's value as a command line.
>>
>> ... because the name of the function is edit-command-line, after all.
>>
>
> I assumed edit-command-line would work inside vared, despite the
> name, and that when $EDITOR finished it would return me to the
> previous context.
>
>> On Sun, Aug 19, 2018 at 6:18 AM, Mikael Magnusson <mikachu@xxxxxxxxx>
>> wrote:
>> > This works in my version of edit-command-line,
>> >
>> > + [[ -z $PREBUFFER ]] && {
>>
>> Hrm, is PREBUFFER really guaranteed to be empty whenever vared is
>> running? I suppose so.
>
> Is there a reason not to commit that? Before we might've thought it was only
> an optimisation but now it seems to enable behaviour that isn't possible with
> the code in HEAD. I don't see anything in my archives about reasons not to
> commit that.
I guess I kinda dropped the ball on this, but at least nobody said not
to commit it in the past two years so I suppose it should be pretty
safe? I've also personally never had any problems (although I pretty
much never go to PS2, but it should act the same as before in that
case).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author