Added status code to prompt
parent
ee83b159ae
commit
c844e21b7b
10
.bashrc
10
.bashrc
|
@ -10,8 +10,16 @@ export EDITOR=nvim
|
||||||
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
# =====FUNCTIONS=====
|
||||||
|
function print_status() {
|
||||||
|
if [[ $1 -ne 0 ]]; then
|
||||||
|
echo "$1 "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# =====PROMPT=====
|
# =====PROMPT=====
|
||||||
PS1=" \e[1;33m\w\e[m \n \e[1;36m>\e[m "
|
PS1=" \e[1;31m\$(print_status \$?)\e[1;33m\w\e[m \n \e[1;36m>\e[m "
|
||||||
|
|
||||||
|
|
||||||
# =====EXTERNAL SCRIPTS=====
|
# =====EXTERNAL SCRIPTS=====
|
||||||
|
|
Loading…
Reference in New Issue