zsh-users
 help / color / mirror / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-users@zsh.org, zsugabubus@national.shitposting.agency
Subject: Re: edit-command-line breaks out of vared
Date: Wed, 5 Aug 2020 13:12:47 +0200
Message-ID: <CAHYJk3SedFT284vN2FVncJg-WBcKx+A3b2MReJR35wqpzTOPbw@mail.gmail.com> (raw)
In-Reply-To: <1534769912.102537.1479915000.00485AFF@webmail.messagingengine.com>

On 8/20/18, Daniel Shahaf <d.s@daniel.shahaf.name> 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@daniel.shahaf.name>
>> > 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@gmail.com>
>> 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


      reply	other threads:[~2020-08-05 11:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-19 12:22 Daniel Shahaf
2018-08-19 13:18 ` Mikael Magnusson
2018-08-19 19:03   ` Bart Schaefer
2018-08-20 12:58     ` Daniel Shahaf
2020-08-05 11:12       ` Mikael Magnusson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHYJk3SedFT284vN2FVncJg-WBcKx+A3b2MReJR35wqpzTOPbw@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-users@zsh.org \
    --cc=zsugabubus@national.shitposting.agency \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git