Skip to content

Instantly share code, notes, and snippets.

View ManfredSchenkIOSB's full-sized avatar

Manfred Schenk ManfredSchenkIOSB

View GitHub Profile
@nsommer
nsommer / .bash_profile
Created April 29, 2018 16:05
Bash prompt that displays current git branch and directory
# Get the Git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Custom bash prompt
#
# Includes custom character for the prompt, path, and Git branch name.
#
# Source: kirsle.net/wizards/ps1.html