|
From: | Neal Fultz |
Subject: | Re: [screen-devel] [bug #57628] Can't access $HOSTNAME in screenrc file |
Date: | Mon, 20 Jan 2020 00:22:46 -0800 |
Follow-up Comment #5, bug #57628 (project screen):
[comment #4 comment #4:]
> $HOSTNAME (as I see in bash) seem to be provided by
> shell expansion logic and are not true environment
> variables set in environment.
> [...]
> You can see this by running 'env' command and observing
> that both of them are missing there.
I'm pretty sure this isn't true and that "env" just doesn't have $HOSTNAME in
its environment because $HOSTNAME is not (or rather is no longer) exported by
default.
This is how I checked my assumption:
- "env | grep HOSTNAME" works after "export HOSTNAME" (so at least it
*behaves* like a normal environment variable)
- the man page doesn't say anything special about $HOSTNAME
- I can't find any special handling in the bash sources.
The patch is very short, but I thought I should point this out because it was
brought up as a rationale. I also wonder if the patch is the right thing to
do. Wouldn't it be surprising for users to special-case a normal environment
variable? An entry in the CHANGES file of bash shows that bash consciously
decided not to export it.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57628>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |