screen-devel
[Top][All Lists]
Advanced

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

[screen-devel] [bug #57628] Can't access $HOSTNAME in screenrc file


From: anonymous
Subject: [screen-devel] [bug #57628] Can't access $HOSTNAME in screenrc file
Date: Sun, 19 Jan 2020 18:42:14 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.9) Gecko/20100101 Goanna/4.4 Firefox/68.9 PaleMoon/28.8.1

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/




reply via email to

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