From: Mehran Kholdi <kholdi.mehran@gmail.com>
To: zsh-workers@zsh.org
Subject: read -e does not restore terminal settings correctly when interrupted if
Date: Sat, 20 Dec 2014 23:16:07 -0500 [thread overview]
Message-ID: <CAKiFbu8P_S_SFFJBQC2DXDXr7aDZA=RN0=sH2xE1p+-DBAyN2Q@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
Hi Zsh guys!
There's a bug in bash that causes inconvenience for zsh users only,
apparently. I don't know why it has been there for so long, given there is
a patch for it already. Do you think there's a way to work around this in
zsh instead?
An excerpt from the original bug
<https://lists.gnu.org/archive/html/bug-bash/2014-09/msg00029.html>:
Given the following script (test.sh) :
> #!/bin/bash
> cleanup() { :; }
> trap cleanup 0
> read -e dummy
> Run the script ('bash test.sh') *in ZSH* and when it waits for an
> input, interrupt it with Ctrl-C. Your terminal is now messed-up. This can
> be verified by running 'cat
> -t' and pressing Enter. ^M will be printed instead of a newline and
> password
> prompts such as the one in sudo cannot be submitted by pressing Enter
> anymore.
Thanks a lot for the awesome zsh,
-- Mehran
next reply other threads:[~2014-12-21 4:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-21 4:16 Mehran Kholdi [this message]
2014-12-21 4:26 ` Mikael Magnusson
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='CAKiFbu8P_S_SFFJBQC2DXDXr7aDZA=RN0=sH2xE1p+-DBAyN2Q@mail.gmail.com' \
--to=kholdi.mehran@gmail.com \
--cc=zsh-workers@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).