mathiasbynens / dotfiles

:wrench: .files, including ~/.macos — sensible hacker defaults for macOS
https://mths.be/dotfiles
MIT License
30.38k stars 8.74k forks source link

Use git-prompt.sh from git contrib #243

Open hkdobrev opened 11 years ago

hkdobrev commented 11 years ago

Instead of the current git functions in .bash_prompt it would be better to use the recommended git way of customizing your PS1.

Checkout source and docs here: https://github.com/git/git/blob/v1.8.4/contrib/completion/git-prompt.sh

It gives you a single function __git_ps1 to use in your prompt and you can customize it with few environment variables.

It has features like:

All of these are optional and could be set via some global constants so it is more customizable.

hkdobrev commented 11 years ago

This should clouse #137 and #155 .