bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Don't set $?=130 when discarding the current command line (not


From: Clark Wang
Subject: Re: Fwd: Don't set $?=130 when discarding the current command line (not run yet) with CTRL-C?
Date: Tue, 24 Dec 2019 10:54:02 +0800

Hi Chet,

On Fri, Nov 22, 2019 at 12:02 AM Chet Ramey <chet.ramey@case.edu> wrote:

> On 11/20/19 9:27 PM, Clark Wang wrote:
> > It's quite common for people to press CTRL-C to discard the current
> command
> > line. This is harmless actually for most times except when people include
> > $? in $PS1. I also show $? in red color when it's not 0 so it's more
> > noticeable. So is it OK to not change $? when people are pressing CTRL-C
> to
> > discard the input?
>
> This behavior dates from at least 2009 and was added at user request so
> they could tell exactly that: whether or not entering the last command had
> been interrupted by a signal.
>

I don't know how many people count on this behavior. Is it possible this be
fixed?

-clark


reply via email to

[Prev in Thread] Current Thread [Next in Thread]