jimeh / git-aware-prompt

Display current Git branch name in your terminal prompt when in a Git working directory.
Creative Commons Zero v1.0 Universal
2.16k stars 340 forks source link

File status with branch name and status. #25

Open Udayan12167 opened 9 years ago

Udayan12167 commented 9 years ago

Git shell on windows shows file status as well with the branch info. We could easily add that by applying parsing to the git status call where we check for a dirty branch. For performance reasons we could keep it optional. If you dont get time to do that, I might in a little while.

lethosor commented 9 years ago

Do you happen to know if msysgit's prompt shows staged changes, unstaged changes, or both? If it only shows one, you could also parse the output of git diff --shortstat [--cached].

Makman2 commented 9 years ago

At least the git shell from the GitHub app shows both, like: [Makman2/colorama +0 ~1 -0]> Where the first one is files added (aka unstaged changes), second files changed and last one files removed.

jimeh commented 9 years ago

I like this idea :)

Makman2 commented 9 years ago

@jimeh I have a working prototype on https://github.com/Makman2/git-aware-prompt/tree/Makman2/file-status But to make it easier for the user I changed nearly the complete git-aware-prompt "subsystem". I also have an install-script :D