Created
August 10, 2017 19:39
-
-
Save edgabaldi/478f1d208a78b86c2b418a9593bbb066 to your computer and use it in GitHub Desktop.
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
function my_beautful_ps1 { | |
local __path="\[\033[38;5;8m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\]" | |
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`' | |
local __end_prompt="\[$(tput sgr0)\]\[\033[38;5;202m\]>\[$(tput sgr0)\]" | |
export PS1="$__path $__git_branch$__end_prompt " | |
} | |
my_beautful_ps1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment