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

Wish item: symbol for branches #8

Open
fniessen opened this issue Jun 28, 2019 · 2 comments
Open

Wish item: symbol for branches #8

fniessen opened this issue Jun 28, 2019 · 2 comments
Labels
enhancement New feature or request feature

Comments

@fniessen
Copy link

Dear Ben,

May I?
You may consider this as going too far - and I'd understand. So, your call!

I'd find it very nice to get the "branch" symbol that I had in PowerLevel9k... but even better: just having it displayed when it's a real branch - I mean, not for trunk (in SVN) nor master (in Git). That'd clearly would make branches stand out in the prompt.

As I said, this is not an issue, nor a bug, just an item on a wish list.

@robobenklein robobenklein added enhancement New feature or request feature labels Jun 28, 2019
@robobenklein
Copy link
Owner

I doubt I'd make this a default thing, but this is a perfect example of why I made ZINC as customizable as possible.

Either you could add a new async segment that just displayed that icon when the output of git rev-parse --abbrev-ref HEAD matches some setting (like != master) and then set it with display mode CONNECT_PREV, or you could modify the zincs_vcs functions as you see fit.

I don't know the command to get the name of the SVN branch in a clean way, if you know how I can try adding such a segment to the fniessen-p9k-port preset.

I'll try one out with git sometime soon to make a demo.

@fniessen
Copy link
Author

Dear Ben,

Here's how to get the branch name:

 svn info | grep '^URL:' | egrep -o '(tags|branches)/[^/]+|trunk' | egrep -o '[^/]+$'

Actually, the branch name is currently incorrect when we are in trunk...

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

No branches or pull requests

2 participants