From: Bart Schaefer <schaefer@brasslantern.com>
To: Budi <budikusasi@gmail.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Help find Zsh' Bash `read -N1 -p "Put here " var
Date: Tue, 22 Aug 2023 12:01:02 -0700 [thread overview]
Message-ID: <CAH+w=7YBMZrh58VCjQkNLOJfhcEh=z3+m7OD6fFzSABZW0rwog@mail.gmail.com> (raw)
In-Reply-To: <20230822174202.adcxbpipov7vsmc2@chazelas.org>
On Tue, Aug 22, 2023 at 10:42 AM Stephane Chazelas
<stephane@chazelas.org> wrote:
>
> - in bash, read -N1 still does backslash processing
Compare "read -n1" (which you did reference in your later examples).
> - read -k reads from the terminal device regardless of where stdin
This can be changed by e.g. "read -k 1 -u 0" (or other descriptor number).
> In any case, both read a *character*, not necessarily a *byte*
> and despite the "k", not necessarily all the characters that are
> sent upon a key or key combination.
If one wants to read full key combinations from within a ZLE widget,
one should use "zle read-command" instead.
next prev parent reply other threads:[~2023-08-22 19:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 12:23 Budi
2023-08-22 12:44 ` Pier Paolo Grassi
2023-08-22 14:19 ` Budi
2023-08-22 14:30 ` Peter Stephenson
2023-08-22 15:21 ` zeurkous
2023-08-22 15:34 ` Ellenor Bjornsdottir
2023-08-22 15:39 ` zeurkous
2023-08-22 17:01 ` Andreas Kusalananda Kähäri
2023-08-22 17:42 ` Stephane Chazelas
2023-08-22 19:01 ` Bart Schaefer [this message]
2023-08-22 19:03 ` Stephane Chazelas
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='CAH+w=7YBMZrh58VCjQkNLOJfhcEh=z3+m7OD6fFzSABZW0rwog@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=budikusasi@gmail.com \
--cc=zsh-users@zsh.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).