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


Groups > gnu.bash.bug > #14788

Re: exiting noninteractive shells on 'shift 2'

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Eric Blake <eblake@redhat.com>
Newsgroups gnu.bash.bug
Subject Re: exiting noninteractive shells on 'shift 2'
Date Fri, 9 Nov 2018 10:46:33 -0600
Organization Red Hat, Inc.
Lines 26
Approved bug-bash@gnu.org
Message-ID <mailman.3755.1541782006.1284.bug-bash@gnu.org> (permalink)
References <cd413815-9523-f280-3ef3-fcd21bf7119e@redhat.com> <d8601773-69c8-16d1-82ab-5068d63bb24d@case.edu> <9ced783a-1c2b-f2c8-2287-fc0f6b967fa8@redhat.com> <fbe5c62d-d633-2fa5-32d1-591ff41a23cc@case.edu> <685c4d41-dcf1-61bc-0b65-04e2b180d568@redhat.com> <26ebd997-741d-0966-de68-4c0b4ea00c15@case.edu>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding quoted-printable
X-Trace usenet.stanford.edu 1541782006 14191 208.118.235.17 (9 Nov 2018 16:46:46 GMT)
X-Complaints-To action@cs.stanford.edu
To chet.ramey@case.edu, bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0
In-Reply-To <26ebd997-741d-0966-de68-4c0b4ea00c15@case.edu>
Content-Language en-US
X-Scanned-By MIMEDefang 2.84 on 10.5.11.23
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 09 Nov 2018 16:46:34 +0000 (UTC)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 209.132.183.28
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
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 <http://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>
Xref csiph.com gnu.bash.bug:14788

Show key headers only | View raw


On 11/9/18 10:42 AM, Chet Ramey wrote:

> 
>>      A diagnostic message shall be written to standard error whenever an
>> error condition occurs."
>>
>> Since 'shift 2' when $# is 1 is an error, and results in non-zero status,
>> it should print a diagnostic to stderr.
> 
> So maybe the thing to do is to turn on the shift_verbose option in posix
> mode.

Cool - I didn't realize we already had a shopt for that. Yes, it sounds 
like in POSIX mode, shift_verbose should be turned on.

On a related note, should turning on POSIX mode also auto-enable xpg_echo?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

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


Thread

Re: exiting noninteractive shells on 'shift 2' Eric Blake <eblake@redhat.com> - 2018-11-09 10:46 -0600

csiph-web