17 lines
383 B
Bash
17 lines
383 B
Bash
|
#
|
||
|
# ~/.bashrc
|
||
|
#
|
||
|
|
||
|
# If not running interactively, don't do anything
|
||
|
[[ $- != *i* ]] && return
|
||
|
|
||
|
parse_git_branch() {
|
||
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
|
||
|
}
|
||
|
|
||
|
# export PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
|
||
|
|
||
|
alias ls='ls --color=auto'
|
||
|
#PS1='[\u@\h \W]\$ '
|
||
|
PS1="\u@\h \[\e[32m\]\w \[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ "
|