Re: Confusing documentation of `ENV` in section "Bash variables"

2020-09-23 Thread Reuben Thomas via Bug reports for the GNU Bourne Again SHell
On Wed, 23 Sep 2020 at 14:24, Chet Ramey  wrote:


> "Expanded and executed similarly to BASH_ENV when an interactive shell is
> invoked in POSIX Mode."
>

Yes, that's better than my suggestions, thanks!

-- 
https://rrt.sc3d.org


Re: Confusing documentation of `ENV` in section "Bash variables"

2020-09-23 Thread Chet Ramey
On 9/22/20 6:27 PM, Reuben Thomas via Bug reports for the GNU Bourne Again
SHell wrote:
> The documentation says:
> 
> 'ENV'
>  Similar to 'BASH_ENV'; used when the shell is invoked in POSIX Mode
>  (*note Bash POSIX Mode::).

Hmmm, I can see that. How about, as you suggest, something like

"Expanded and executed similarly to BASH_ENV when an interactive shell is
invoked in POSIX Mode."

The behavior is described pretty completely in the INVOCATION section.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Confusing documentation of `ENV` in section "Bash variables"

2020-09-22 Thread Reuben Thomas via Bug reports for the GNU Bourne Again SHell
The documentation says:

'ENV'
 Similar to 'BASH_ENV'; used when the shell is invoked in POSIX Mode
 (*note Bash POSIX Mode::).

However, as described elsewhere in the manual, BASH_ENV is used
specifically for non-interactive shells, whereas ENV is used specifically
for interactive shells. From the quoted section above, one might get the
erroneous impression that ENV is just like BASH_ENV but for POSIX mode.

If I've not misunderstood, maybe a little more explanation in the quoted
section would be a good idea? Even just changing "invoked" to "invoked
interactively". Although that then runs the risk of implying that BASH_ENV
is also used in interactive mode. Alternatively, remove "Similar to
'BASH_ENV';".

-- 
https://rrt.sc3d.org