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

Custom car become static rather then dynamic #50

Closed
korney4eg opened this issue Jul 27, 2020 · 4 comments
Closed

Custom car become static rather then dynamic #50

korney4eg opened this issue Jul 27, 2020 · 4 comments
Labels

Comments

@korney4eg
Copy link

korney4eg commented Jul 27, 2020

Hello,
Thanks for great tool.

I'm thinking about building custom car that displays current aws profile. Here is my configuration for bash:

export GBT_CAR_CUSTOM_TEXT_CMD="echo $AWS_PROFILE"
export GBT_CARS='Status, Os, Hostname, Dir, Git,Custom, Sign'
export PS1='$(gbt $?)'
export GBT_CAR_HOSTNAME_DISPLAY='0'
export GBT_CAR_DIR_DEPTH='2'

By design when I change AWS_PROFILE to non-default I should see my non-default in the prompt. Unfortunately I cannot see this change.

What am I'm missing here?

Thank you in advance.

@jtyr
Copy link
Owner

jtyr commented Jul 27, 2020

Try this:

export GBT_CAR_CUSTOM_TEXT_CMD='echo $AWS_PROFILE'
export GBT_CARS='status, os, dir, custom, git, sign'
export GBT_CAR_DIR_DEPTH='2'
PS1='$(gbt $?)'

Let me know if that works.

@korney4eg
Copy link
Author

Thanks, it works!

@jtyr
Copy link
Owner

jtyr commented Jul 27, 2020

You can also add a nice AWS icon in front of the profile name and display the car only when the variable is set:

export GBT_CAR_CUSTOM_TEXT_CMD='echo -e "\ue7ad $AWS_PROFILE"'
export GBT_CAR_CUSTOM_DISPLAY_CMD='[[ -n $AWS_PROFILE ]] && echo YES'

@korney4eg
Copy link
Author

wow! Thank you

@jtyr jtyr added the question label Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants