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

Show git branch on git command? #2781

Open
doanngochieuo opened this issue Oct 24, 2024 · 2 comments
Open

Show git branch on git command? #2781

doanngochieuo opened this issue Oct 24, 2024 · 2 comments

Comments

@doanngochieuo
Copy link

Powerlevel10k has POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND to show kube info when typing kubectl i.e, I want something similar but showing only git branch in POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS, still showing other vcs info in POWERLEVEL9K_LEFT_PROMPT_ELEMENTS, how can i do that?

@Syphdias
Copy link
Contributor

I would say the easiest way would be to build your own segment, that only shows the branch and remove the branch from the segment vcs. Check out p10k help segement. https://github.com/romkatv/powerlevel10k#extensible
You can then use the POWERLEVEL9K_*_SHOW_ON_COMMAND setting with * as your prompt segment.

@Syphdias
Copy link
Contributor

@doanngochieuo, you might be interested in this thread: #452

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