[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues in option handling (Was: break no longer breaks out of loops
From: |
Chet Ramey |
Subject: |
Re: Issues in option handling (Was: break no longer breaks out of loops defined in an outer context) |
Date: |
Wed, 15 Mar 2017 14:18:37 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 3/7/17 7:23 AM, Stephane Chazelas wrote:
> See also:
>
> $ POSIXLY_CORRECT=1 bash -c 'set +o posix; set +o' | grep posix
> set +o posix
> $ POSIXLY_CORRECT=1 bash +o posix -c 'set +o' | grep posix
> set -o posix
>
> (not a regression, already in 4.3)
>
> I'd expect explicit command line options to take precedence over
> the environment.
That's maybe not an unreasonable expectation, but bash has never
worked like that, and I'm not going to change it now. Command line
options have always been processed before variables are initialized
from the environment.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/