oh-my-bash
oh-my-bash copied to clipboard
base.theme.sh git branch names fix
base theme replaces underscores in a branch name. hello_world -> hello-world
It's inconvenient when a end user copy-pastes the branch name from PS1 and
impossible to force everybody to use -
in branch names.
@nntoan Could you take a look? Please let me know if need more description.
@chaifeng , @surendrand, @jverce Yo Guys, can you take a look at the PR
I'm seeing in other themes that they don't even do a cleanup of the branch name (other than the obvious removal of refs/heads/
). For example:
We might get away with removing the cleanup altogether since git
already prevents certain characters from being used in branch names:
jay@jay-desktop > ~/dev/dummy_repo > master$ git checkout -b 'foo:bar'
fatal: 'foo:bar' is not a valid branch name.
✘ jay@jay-desktop > ~/dev/dummy_repo > master$ git checkout -b 'foo;bar'
Switched to a new branch 'foo;bar'
jay@jay-desktop > ~/dev/dummy_repo > foo;bar$
What do you think?
Ah, #200 was actually a duplicate of this PR. I have already merged #200. Sorry for the missing credit.
I'm seeing in other themes that they don't even do a cleanup of the branch name (other than the obvious removal of
refs/heads/
).
Maybe we can think of completely removing these escapes.
As I have written in the previous reply, I failed to pick up your contribution in the repository. Nevertheless, let me thank you again for opening the PR! Let me close the PR now.
For your reference, recently we have merged another commit to allow a wider range of git branch names in PR #420.
Thank you again.