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
add user/repo before branch (based on remote.origin.url) #403
Conversation
…mote.origin.url supports 3 url types: - https://user@bitbucket.org/user/repo.git - https://github.com/user/repo.git - git@github.com:user/repo.git adds user/repo to [branch] giving us [user/repo:branch]
Thanks, very nice idea. But you are right, this option should be at least configurable (and off by default), as this would change the current prompts of many users ;) Also an update of the docs would be nice. |
Just to check that I understand you correctly, you're in favor of adding this feature, just asking to make it configurable, off by default and updating the docs, correct? (so I won't be wasting time if it's not going to be accepted - I'm fine with it being hardcoded in the version I use ;) |
Jepp, thats correct. Once you have this in, I will accept this gladly ;) |
- USERNAME_REPO token is now configurable via GIT_PROMPT_PREFIX="[${Blue}_USERNAME_REPO_|" - added a new basic theme demonstrating it Single_line_username_repo
OK, @magicmonty, please have a look. I thought that the best place to optionally push it is in
I added Let me know if you're happy with it and then I will finalize this PR with docs. Also let me know whether the token name is intuitive, what it gives is Here is the current prompt I have with this forked repo:
|
@magicmonty, you asked me to make it configurable - which I did 2 weeks ago - can we complete this please? |
@stas00 I'm sorry but I'm currently a bit busy. I will check this on the weekend. I promise ;) |
@stas00 Sorry, I f**cked the merge of the PR up.
I close this PR but don't worry, as I said, the changes are in the master branch now (my bad). |
Looks perfect, @magicmonty. Thank you for integrating it in the most efficient way and completing the docs. |
This is an excellent tool! Thank you, Martin.
I work in parallel with the original repo and its fork on github, and therefore often it's hard to tell which of the two I'm inside off, especially since both have a 'master'. So I found it very helpful to also display the user/repo information together with the branch.
This PR adds user/repo to [branch] giving us [user/repo:branch]
It supports 3 url types:
git config --get remote.origin.url
I'm sure that it needs to be made configurable and perhaps custom color support added, but this is a start.
Thank you!