You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I know the project is close-to-unmaintained, but I'm hoping it will be very quick to point me in the right direction for how to solve this.)
I love this project, but the branch name abbreviation drives me absolutely batty. The way we use git at work, all my branches start with the same chiphogg/ prefix, which thus contains zero information. And the end of the branch often includes #PROJ-1234 suffixes, which all kinda blend together. The real useful information is in the middle!
I want to configure the prompt to print the full branch name, always, no matter how long it is. Which pathway(s) are available to me?
Follow the copy-and-modify approach at the end of the bash section
Provide a PR to add a new environment variable that a user can set, to gate what I assume is the truncation code
Is (1) even an option, if the contents of where get unconditionally clobbered by the truncation code? I assume not --- so, therefore, I assume that (3) is the way to go.
By the way, the act of choosing (3) means that also doing (2) would be a very small marginal effort. So, I'll probably put up a PR as well after I fork it. Given the status of this repo, I have no expectation that it will be merged... but, there's an outside chance that the PR ends up being both simple and desirable enough that you might merge it anyway.
And if not, then the PR will end up linked to this issue, so others who want this functionality will be able to stumble upon it.
I ended up creating #483, since I wanted to have the option to have a fully default prompt (apart from the abbreviation, of course). I've been using it for a few days, and it works great.
The only downside I see to this approach is that it introduces a new discrepancy between the features for bash and zsh. My understanding is that they were already not at feature parity, so maybe that's OK, but I'll let you be the judge. Options I can see are:
Reject the PR.
Accept the PR; live with bash having a config option that zsh does not.
Accept the PR after it supports zsh; move documentation outside of the bash section to somewhere more general.
I'd have been happy to add zsh support, but I don't use zsh so it's not easy for me to test it.
Activity
romkatv commentedon Dec 3, 2025
1 is a good option, and so is 3.
chiphogg commentedon Dec 3, 2025
Thank you!
Is (1) even an option, if the contents of
whereget unconditionally clobbered by the truncation code? I assume not --- so, therefore, I assume that (3) is the way to go.By the way, the act of choosing (3) means that also doing (2) would be a very small marginal effort. So, I'll probably put up a PR as well after I fork it. Given the status of this repo, I have no expectation that it will be merged... but, there's an outside chance that the PR ends up being both simple and desirable enough that you might merge it anyway.
And if not, then the PR will end up linked to this issue, so others who want this functionality will be able to stumble upon it.
Permit opting out of branch name truncation
romkatv commentedon Dec 4, 2025
For (1), you can start with this:
Modify
my_set_promptas you like.chiphogg commentedon Dec 7, 2025
Thanks!
I ended up creating #483, since I wanted to have the option to have a fully default prompt (apart from the abbreviation, of course). I've been using it for a few days, and it works great.
The only downside I see to this approach is that it introduces a new discrepancy between the features for bash and zsh. My understanding is that they were already not at feature parity, so maybe that's OK, but I'll let you be the judge. Options I can see are:
I'd have been happy to add zsh support, but I don't use zsh so it's not easy for me to test it.