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
- X-seq: zsh-users 29354
- From: zeurkous@xxxxxxxxxxxxxxx
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: RE: Re: zsh-no-ps2: A plugin that inserts a newline on Enter instead of displaying PS2
- Date: Sun, 12 Nov 2023 19:18:33 +0000 (UTC)
- Archived-at: <https://zsh.org/users/29354>
- In-reply-to: <CAH+w=7Yq8DSYnM2gEZzrJ2-6+RAi6yqZvCDf=sZqNTNNJt=cEg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAN=4vMqm22rFLZnhM=7ytKr4wG14hQGGE3u6m1-cgkUAXCNvsg@mail.gmail.com> <6550dda9.170a0220.4fe72.dd3bSMTPIN_ADDED_BROKEN@mx.google.com> <CAH+w=7Yq8DSYnM2gEZzrJ2-6+RAi6yqZvCDf=sZqNTNNJt=cEg@mail.gmail.com>
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