Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15785
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Fwd: Don't set $?=130 when discarding the current command line (not run yet) with CTRL-C? |
| Date | 2019-12-26 14:42 -0500 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.1473.1577389385.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> <60095ca0-7c1a-87fa-937c-78e04f068674@case.edu> |
On 12/23/19 9:54 PM, Clark Wang wrote: > Hi Chet, > > On Fri, Nov 22, 2019 at 12:02 AM Chet Ramey <chet.ramey@case.edu > <mailto: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? There is nothing to `fix'; this is the intended behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Fwd: Don't set $?=130 when discarding the current command line (not run yet) with CTRL-C? Chet Ramey <chet.ramey@case.edu> - 2019-12-26 14:42 -0500
csiph-web