Skip to content

Instantly share code, notes, and snippets.

@gtkatakura-bysoft
Created May 25, 2018 16:38
Show Gist options
  • Save gtkatakura-bysoft/e36efd1161daabd3fbab5f3e1ada398e to your computer and use it in GitHub Desktop.
Save gtkatakura-bysoft/e36efd1161daabd3fbab5f3e1ada398e to your computer and use it in GitHub Desktop.
.termscripts/bash
COLOR_OFF="\[\033[0m\]"
GREEN="\[\033[0;32m\]"
YELLOW="\[\033[0;33m\]"
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /'
}
# export PS1="${GREEN}\w ${YELLOW}\$(parse_git_branch)${COLOR_OFF}\nλ "
export PS1="${GREEN}\w ${YELLOW}\$(parse_git_branch)${COLOR_OFF}$ "
# export PS1="${GREEN}\w ${COLOR_OFF}$ "
# export PS1="${YELLOW}$(parse_git_branch)${COLOR_OFF}$ "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment