Subject: use of "less" in function and interrupt
From: Vincent Lefevre <[email-masked]>
To: [email-masked]
Date: Wed, 20 Jul 2016 13:36:33 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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 <[email-masked]> - 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)