From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: use of "less" in function and interrupt
Date: Wed, 20 Jul 2016 13:36:33 +0200 [thread overview]
Message-ID: <20160720113633.GA17431@zira.vinc17.org> (raw)
With zsh 5.2, if I type:
zira% sleep 5 | less
and Ctrl-C immediately after, this interrupts the "sleep 5" and
everything is fine ("less" ignores the SIGINT).
But if I use a function:
zira% tless() { less "$@"; }
zira% sleep 5 | tless
then "less" is left stopped in background after I type a key.
bash and mksh do not have this problem (Debian's ksh93 93u+20120801-2
is completely broken as "less" is immediately put in background).
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
next reply other threads:[~2016-07-20 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 11:36 Vincent Lefevre [this message]
2016-07-20 12:21 ` Peter Stephenson
2016-07-21 3:40 ` Bart Schaefer
2016-07-21 18:51 ` Vincent Lefevre
2016-07-23 17:02 ` Bart Schaefer
2016-07-25 13:40 ` Vincent Lefevre
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=20160720113633.GA17431@zira.vinc17.org \
--to=vincent@vinc17.net \
--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).