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

Re: edit-command-line breaks out of vared

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

Mikael Magnusson

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