3

I use long descriptive branch names in git, causing the prompt to take up too much space leaving less room for long paths.

I would like to limit the git plugin's branch segment to something like 15 characters which will be enough for me to keep track of which branch I'm on without showing the full branch name. Is this possible? I'm using oh-my-zsh.

1 Answer 1

3

There is a set of options in powerlevel9k:

POWERLEVEL9K_VCS_SHORTEN_LENGTH=4
POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH=11
POWERLEVEL9K_VCS_SHORTEN_STRATEGY="truncate_from_right"
POWERLEVEL9K_VCS_SHORTEN_DELIMITER=".."

Read more at https://github.com/bhilburn/powerlevel9k#vcs-truncation

2
  • Can you please tell more about what those options mean?
    – CaldeiraG
    Commented Jun 14, 2019 at 9:17
  • Awesome, this was added a little over a year after I asked this question. Nice to see this feature added. github.com/bhilburn/powerlevel9k/commit/…
    – Matthew
    Commented Jun 14, 2019 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .