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

Add support for active gcloud account in powerline prompt #1851

Merged
merged 2 commits into from
Mar 15, 2021

Conversation

ofirshtrull
Copy link
Contributor

@ofirshtrull ofirshtrull commented Mar 11, 2021

Description

I have a situation that I have 3 clients all in GCP
and I'm constantly changing between accounts and I thought maybe I can add a prompt vizualtion like with aws
so here it is

Motivation and Context

look at the description :-)

How Has This Been Tested?

I tested it on my mac

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

Copy link
Contributor

@davidpfarrell davidpfarrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks legit !

Kudos for adding a core function in base so other themes could easily add their own version of the prompt.

@ofirshtrull
Copy link
Contributor Author

@davidpfarrell the only upgrade i couldn't find is to add the googke or gcp logo insted of the (g) in front of the active account name maybe

@davidpfarrell
Copy link
Contributor

@davidpfarrell the only upgrade i couldn't find is to add the goog[l]e or gcp logo insted of the (g) in front of the active account name maybe

Searching NerdFonts for "google_cloud" yielded this:

Screen Shot 2021-03-11 at 2 25 58 PM

here's the character for copy/pasting:

Its likely not present in the default powerline font, but should be available to any nerd-font user.

Since its (probably) not in the powerline font, I'm not sure if its a good idea to make it the default character.

Probably best to leave a standard ascii/unicode character as default, but you could add the a note in the docs on how to override the character (and maybe link to nerdfonts) as I'm sure other nerds out there would like to use it, too :)

@ofirshtrull
Copy link
Contributor Author

@davidpfarrell I think I will just leave the (G) to support everyone

@NoahGorny
Copy link
Member

well done @ofirshtrull 😄

@NoahGorny NoahGorny merged commit 6f02b8d into Bash-it:master Mar 15, 2021
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.

3 participants