Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15772

Re: Fwd: Don't set $?=130 when discarding the current command line (not run yet) with CTRL-C?

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Clark Wang <dearvoid@gmail.com>
Newsgroups gnu.bash.bug
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
Lines 22
Approved bug-bash@gnu.org
Message-ID <mailman.1346.1577156088.1979.bug-bash@gnu.org> (permalink)
References <CADv8-ogKo=wDshxPiJj8D+BydvcOFS99KQ5pDjWCu7a1v=8nwQ@mail.gmail.com> <CADv8-oi+7MQ042_cAjtPrr4Jm=EFjjFLHGxSOPpWwF3066uotA@mail.gmail.com> <4b15601c-1b0d-01c5-990e-7fdf4600fb9e@case.edu> <CADv8-ohUopOBDYS6cmgRAFFX1i8GyFN_j2kwn1sNoKPOHBy-VA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1577156089 21574 209.51.188.17 (24 Dec 2019 02:54:49 GMT)
X-Complaints-To action@cs.stanford.edu
Cc "bash.bug list" <bug-bash@gnu.org>
To Chet Ramey <chet.ramey@case.edu>
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fEIW165lVTKbpoAbfNVFVcZYVEzG5xoVU0CJ6kpgd2U=; b=KVE7SbhUNfKseAjnMvTmNK0Og+fy9QEwGKPtNl91L+10P7WL7bjjCxSv2IIYXLgLcL F30Lfdh9L8LRKtwTaro0zA8aOVlqsA3YPq/jh9IxhNPXgkvh35u0jLaPZAER8D8GF5r7 BWrMHpLCUHgfyl8LG1+9zkUu6uXJS9X9mm/dQGzuUyyeSjTqALjyRdoGeSJopj0kJftA Vp8oRYTlWwC2nHyLadbfQY0MPlNiEyoukYf1NG1QVDnxgJDOoLZIcm/rwiAHLT8Cekn2 kLeEjx8t4FTDbT9MVN5TUHfF5Rxq1eIrHQhEY0vdpjhwhJnxwJ9C/FfgY+4RTLYwrQ9A Sm8w==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fEIW165lVTKbpoAbfNVFVcZYVEzG5xoVU0CJ6kpgd2U=; b=PatVLfIvJyvo4V2tgGS77d8nk1z9GLyBICRjAlCzR5q5O22EMl5nuCtA3ocFppdyFO N6EvRCrdmJZHOCBSUae9mU5X2urfU+5OTTXY2mNVDDRG20FVoAz6fSzGIVjrL1rnTLcz 9K5xSrUth6ybzu4ScLo7mWKxSQRSlYawkBefI6WS7wZEs6dVYcQoyk71h/9gjvLcfRhd UWTtVkPSgurBWgkSXycTtmOOmrlYX8DBz/i82/lD6n3HZijfD/hNCSxJVfOKQnZG08J4 DOSaYLEercMN6BRKiHW3oq1rw84j4vwAc9re2VUe+q8f9Kl2taR1N4Yb6zD4qZPcBfbJ gIlw==
X-Gm-Message-State APjAAAWvuI3MaDb73Sgks0Nj8fHmHdmsa4Z1VU/IBxW97FFI4QY1lf8c MuC6S2ydCe0pLI/zt8yatZhDO2ubU5bqkAiR2cM=
X-Google-Smtp-Source APXvYqyjr8wqMc/P7CnIvw3OKIaCJB28OJxdzSv+XA3aLd8gqtheYA1tMbrcPTJMmSFe9qhljdeL7qMHIGVxan9+bFA=
X-Received by 2002:a05:6638:102:: with SMTP id x2mr25861820jao.71.1577156078280; Mon, 23 Dec 2019 18:54:38 -0800 (PST)
In-Reply-To <4b15601c-1b0d-01c5-990e-7fdf4600fb9e@case.edu>
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2607:f8b0:4864:20::d2c
X-Content-Filtered-By Mailman/MimeDel 2.1.23
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CADv8-ohUopOBDYS6cmgRAFFX1i8GyFN_j2kwn1sNoKPOHBy-VA@mail.gmail.com>
X-Mailman-Original-References <CADv8-ogKo=wDshxPiJj8D+BydvcOFS99KQ5pDjWCu7a1v=8nwQ@mail.gmail.com> <CADv8-oi+7MQ042_cAjtPrr4Jm=EFjjFLHGxSOPpWwF3066uotA@mail.gmail.com> <4b15601c-1b0d-01c5-990e-7fdf4600fb9e@case.edu>
Xref csiph.com gnu.bash.bug:15772

Show key headers only | View raw


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

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Fwd: Don't set $?=130 when discarding the current command line (not run yet) with CTRL-C? Clark Wang <dearvoid@gmail.com> - 2019-12-24 10:54 +0800

csiph-web