이런식으로 출력되며 검은색 배경 기준으로 색이 적당히 들어가 있습니다.
todo perhapsspy at ~/Projects/todo (origin/master)
$
~/.bash_profile 에 추가
function git_info() {
git rev-parse --is-inside-work-tree &>/dev/null || return
branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
dirty=$(git diff --quiet --ignore-submodules HEAD &>/dev/null; [ $? -eq 1 ]&& echo -e "*")
remote=$(git remote)
echo '('$remote/$branch$dirty')'
}
function pyenv_version() {
pyenv version-name &> /dev/null || return
version_name=$(pyenv version-name)
echo $version_name' '
}
export PYENV_VIRTUALENV_DISABLE_PROMPT=1
export PS1="\e[36m\$(pyenv_version)\e[39m\u at \e[34m\w \e[32m\$(git_info)\[\033[00m\]\e[39m\n$ "