http://askubuntu.com/questions/249174/prepend-current-git-branch-in-terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse_git_branch)$ "
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse_git_branch)$ "
'Linux' 카테고리의 다른 글
convert date format in bash (0) | 2015.04.28 |
---|---|
Recursively delete .svn directories (0) | 2015.04.07 |
synergy (0) | 2014.08.19 |
smack (0) | 2014.03.20 |
korean keyboard on ubuntu (0) | 2014.02.24 |