[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exiting noninteractive shells on 'shift 2'

From: Eric Blake
Subject: Re: exiting noninteractive shells on 'shift 2'
Date: Fri, 9 Nov 2018 10:46:33 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]