Created
April 26, 2016 10:47
-
-
Save Codesleuth/b2454abaac83076bf653e7668502e9f1 to your computer and use it in GitHub Desktop.
hitch and PS1 with Git Bash for Windows 2.8+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git_author() { | |
| if [ -z "$GIT_AUTHOR_NAME" ]; then | |
| echo "developer" | |
| else | |
| echo "$GIT_AUTHOR_NAME" | |
| fi | |
| } | |
| hitch() { | |
| command hitch "$@" | |
| if [[ -s "$HOME/.hitch_export_authors" ]] ; then source "$HOME/.hitch_export_authors" ; fi | |
| export PS1="\[\033]0;$MSYSTEM:\w\007\]\n\[\033[32m\]$(git_author) @ \h \[\033[33m\]\w$(__git_ps1) \[\033[0m\]\n$ " | |
| } | |
| hitch | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment