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


Groups > gnu.bash.bug > #14788 > unrolled thread

Re: exiting noninteractive shells on 'shift 2'

Started byEric Blake <eblake@redhat.com>
First post2018-11-09 10:46 -0600
Last post2018-11-09 10:46 -0600
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#14788 — Re: exiting noninteractive shells on 'shift 2'

FromEric Blake <eblake@redhat.com>
Date2018-11-09 10:46 -0600
SubjectRe: exiting noninteractive shells on 'shift 2'
Message-ID<mailman.3755.1541782006.1284.bug-bash@gnu.org>
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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web