X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=.bashrc;h=c04841584fd73fcea69a6cb266370ef94922b443;hb=d7974f44289f5483e6eeb81e5c6ae20991943dfb;hp=c7c30d0c25ff35c3ab5ac4ee1236dc102121c417;hpb=3ce5198b704dba3e81a61d67e431f45a0f4e3ff4;p=dotfiles.git diff --git a/.bashrc b/.bashrc index c7c30d0..c048415 100644 --- a/.bashrc +++ b/.bashrc @@ -15,4 +15,10 @@ export HISTCONTROL=ignoreboth alias ls='ls --color=auto' alias grep='grep --color=auto' -[ ! -s ~/.config/mpd/pid ] && mpd +set_prompt(){ + last_c=$? + PS1='\u@\h' + [[ $last_c -ge 1 ]] && PS1="($last_c) $PS1" + PS1="$PS1\w\$ " +} +PROMPT_COMMAND='set_prompt'