|
|
|
|
|
by michaelallen
3949 days ago
|
|
Thanks! Glad you like it. Fair point on the `git:(`, it's mostly a hold over from robbyrussells oh-my-zsh theme (which inspired me to make the first version of this about 2 years ago (https://github.com/michaeldfallen/oh-my-zsh/blob/master/them...). The entire thing is composable so if you want a prompt without those bits just fork and modify: https://github.com/michaeldfallen/git-radar/blob/master/prom.... Or should I be making these "pieces" like `git:(` and `)` configurable through args / env vars? On the untracked files I personally never leave a file untracked. I either commit it or add it to .gitignore. Though I see how you use git differently, how about a --ignore-untracked to ignore untracked files? |
|
I'm totally on board with you about trying not to leave things untracked. It seems like things always accumulate that shouldn't be committed but are useful; I should probably just move them to a different root folder.
Here's the prompt I use[0], adapted from some shell script I found online somewhere. I'm not going to link to the code because it's kind of ugly but it is up on my github.
A clean repository is subdued but readable blue. When there are unstaged changes there's a red plus, and staged changes get a green plus (some of both is yellow). Any branch discrepancies at all are shown by writing the branch name in bold red.
I don't try to give myself too much information, making the assumption that you'll have to do some digging to get enough detail to actually do anything about the situation.
[0]: http://i.imgur.com/sttMpfQ.png