Skip to content

Instantly share code, notes, and snippets.

@2yk
Created October 17, 2018 09:17
Show Gist options
  • Save 2yk/d0b3a68ef03fecd60ee441aecd52034a to your computer and use it in GitHub Desktop.
Save 2yk/d0b3a68ef03fecd60ee441aecd52034a to your computer and use it in GitHub Desktop.
My base prompt setup => local:<Dir name>(Git Branch)$
git_branch() {
git branch 2> /dev/null | sed -e 's/* \(.*\)/(\1)/'
}
PS1="\[\033[01;32m\]local\[\033[00m\]:\[\033[01;34m\]\W\[\033[33m\]\$(git_branch)\[\033[00m\]$ "
@2yk
Copy link
Author

2yk commented Oct 17, 2018

Update =>

PS1="\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\]@\[\033[0;36m\]local\[\033[00m\]:\[\033[01;34m\] \w\[\033[33m\]\$(__git_ps1)\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment