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

RE: Re: zsh-no-ps2: A plugin that inserts a newline on Enter instead of displaying PS2



On Sun, 12 Nov 2023 10:59:36 -0800, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> > Normally, when you press Enter in zsh, one of two things happens:
>>
>> Might be worth noting that this is also the case with 'Return', which,
>> confusingly, produces a carriage return. ('Enter' does only do so by
>> later convention; the latter really means "submit data for immediate
>> processing", which is a different operation on mainframes).
>
> Interesting as a historical curiosity, but I don't recall zsh ever
> running on a mainframe, and typical keyboards have for decades now
> produced either '\r' or '\n' pretty much interchangeably for either or
> both of Return and Enter, so zsh has always treated the two as
> equivalent unless instructed not to.

Still, it's perhaps best to speak in terms of what zsh reads (which has
usually been filtered by termios(4) or a similar line discipline),
instead of in terms of how keys are labeled (often erroneously these
days...) on the actual keyboard. 

>> Interrupt, then recall the command from the history buffer.
>
> This is also what the push-line-or-edit ZLE widget simulates.  I
> always rebind ESC-q to push-line-or-edit, leaving ESC-(shift)Q for
> push-line.

That appears useful, thanks.

        --zeurkous.

-- 
Friggin' Machines!




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