Path: csiph.com!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!feeder.erje.net!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Clark Wang Newsgroups: gnu.bash.bug Subject: Fwd: Don't set $?=130 when discarding the current command line (not run yet) with CTRL-C? Date: Thu, 21 Nov 2019 10:27:08 +0800 Lines: 7 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1574303270 4100 209.51.188.17 (21 Nov 2019 02:27:50 GMT) X-Complaints-To: action@cs.stanford.edu To: "bash.bug list" 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; bh=ky2OcCjntXcLXhPuCMHtVKAErpRQbPY+9jCStWu/Y2k=; b=ar4RW1t2UcxlPcezYIXXpBHmAX/DhiZgmeyqKl1z4DoStsbrsc7SDvbir7dWfTIfH2 2s0hEcorhU7925uX7+TEC3+tPuHpFFRlTzDcuna9cVbvbXDCmbtwB9MjI9V9Exrzbvo0 //ZshuBob/VwdOopWzPAAohLUzM9Ba2uPJuh5n1WEYOJYJaTIDxw/Y6lBa6+TYro+Fvc 3V3U4zq14jTZ9OhhX8O/jdf3zAYXvTm+LKa2rZ4XtgJC+dfpPLaMEr5nuzKGMmi0Hyaa +YZsr2tP7qhprHnp+a2H/Ys9HbM/AoeQRab4N1S/+bObBTaega/2bP4hBiKQx0gkEup1 s6OA== 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; bh=ky2OcCjntXcLXhPuCMHtVKAErpRQbPY+9jCStWu/Y2k=; b=Bxo3LtyeEfDL+2dY9C72wQi5ki6fS18HNXGH1zKkJ5dt/0nGdvQYMBTkfKUEiOXGUz yVbmNlyEzJySuYNCXkULn+x88jdMI7d6hlkbDAyJ7hTIGn+lUHpN1WxtUh5/yr4C4vDt bzDgiZ8hg9xfjq0+E9aVxP7jih9GN5T5xytTwr3SBsVpGdbwh2NXN1E/8QvXqVwGWdj3 TN7bQk9o1mfgT/nWXgLqLQCiui5htRILWM0MmekAZLUAytw64bYkLsZOe4LpmQnHD++J 20CecBw2olhsoBr80UXVa2+sMcHYVR7eNEsdp0PD8SWxkZxdS62FMb1GWueh/ItvRKFi xPkA== X-Gm-Message-State: APjAAAV+2d1JMHXBfqNTCtq+O8Y6WV/oNfCSPmSKyI3U2RRRYcjQH/Mi Vm6M3aT/aal+gqgfydIYNj05NvytAhJw0UsWjKrvLopJQZY= X-Google-Smtp-Source: APXvYqyeUSDbZB9UvnyiMxpvfoXkLdXZIxb2CLbUYE09XZ/JmKNbLd+U8FzbhaFpT8Aj+G/lV2r1L9JI/GTPPk677zk= X-Received: by 2002:a6b:b2d5:: with SMTP id b204mr5661895iof.137.1574303265059; Wed, 20 Nov 2019 18:27:45 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d36 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:15621 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? -clark