Skip to content

Add 'GP_' prefix to environment variables #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aclindsa
Copy link

This avoids a name collision with $HOST and $USER, which are overloaded
in Linux/Unix environments.

This avoids a name collision with $HOST and $USER, which are overloaded
in Linux/Unix environments.
@dlenski
Copy link
Owner

dlenski commented Sep 17, 2019

This avoids a name collision with $HOST and $USER, which are overloaded in Linux/Unix environments.

Good point. Though openconnect --authenticate (which I'm trying to emulate here) also emits the HOST variable, and I don't think anyone ever complains about that.

I actually don't think this should cause any problems, since it'd normally only be used in a shell script environment where the variables won't be exported to the user's interactive shell… am I overlooking something?

@aclindsa
Copy link
Author

Hmm, I wasn't aware you were emulating an existing interface. Is this script something you would expect folks to use as a drop-in replacement for openconnect --authenticate in existing setups, or is this more simply following a convention since something similar already existed?

It seems that the reason I noticed it when others have not is because I'm using zsh, which uses the $HOST variable to store the hostname (whereas bash uses $HOSTNAME), so it mucked with my shell prompt. I don't know whether setting it is actively harmful, but it seemed like it wouldn't hurt to avoid the unintentional collision, either. I can see setting $HOST and $USER over top of the preexisting values as being particularly annoying when using the -b option to background openconnect in a terminal window in which you wish to continue doing other work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants