Skip to content
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

side-effect/overriden environment variables #19

Closed
ahmetb opened this issue Jan 7, 2018 · 3 comments
Closed

side-effect/overriden environment variables #19

ahmetb opened this issue Jan 7, 2018 · 3 comments

Comments

@ahmetb
Copy link
Contributor

ahmetb commented Jan 7, 2018

the following doesn't work for two reasons:

# .zshrc file:
export KUBE_PS1_PREFIX='['
export KUBE_PS1_SUFFIX=']'
source "$HOME/workspace/dotfiles/kube-ps1.sh"
  1. it ignores my settings
  2. replaces the passed value with the defaults ( and ).
(⎈ |docker-for-desktop:default) ➜  ~ env | grep KUBE
KUBE_PS1_PREFIX=(
KUBE_PS1_SUFFIX=)

ideally the order of export and source shouldn't matter in this case I think.

If I move export after sourcing, it works.

@jonmosco
Copy link
Owner

jonmosco commented Jan 8, 2018

Agreed, another great find. 247ad97 should address this issue.

@jonmosco
Copy link
Owner

Did you get a chance to test this out?

@ahmetb
Copy link
Contributor Author

ahmetb commented Jan 10, 2018

yeah, works fine now, thanks!

@ahmetb ahmetb closed this as completed Jan 10, 2018
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

No branches or pull requests

2 participants