X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=.bashrc;h=28063f1ca448fa83757f03fb7cbe297ee8a30631;hb=2ed6d7793226220a23804b216a10063f44391217;hp=c7c30d0c25ff35c3ab5ac4ee1236dc102121c417;hpb=a01989361d171f6158fdb898a69a6cdd071b6c05;p=dotfiles.git diff --git a/.bashrc b/.bashrc index c7c30d0..28063f1 100644 --- a/.bashrc +++ b/.bashrc @@ -16,3 +16,12 @@ alias ls='ls --color=auto' alias grep='grep --color=auto' [ ! -s ~/.config/mpd/pid ] && mpd + +source /usr/share/git/completion/git-prompt.sh +set_prompt(){ + last_c=$? + PS1='\u@\h' + [[ $last_c -ge 1 ]] && PS1="($last_c) $PS1" + PS1="$PS1\w$(__git_ps1)\$ " +} +PROMPT_COMMAND='set_prompt'