Skip to content

Instantly share code, notes, and snippets.

@Codesleuth
Created April 26, 2016 10:47
Show Gist options
  • Select an option

  • Save Codesleuth/b2454abaac83076bf653e7668502e9f1 to your computer and use it in GitHub Desktop.

Select an option

Save Codesleuth/b2454abaac83076bf653e7668502e9f1 to your computer and use it in GitHub Desktop.
hitch and PS1 with Git Bash for Windows 2.8+
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