bash: better prompt

This commit is contained in:
buffet 2023-09-27 14:48:15 +02:00
parent b66591d2cb
commit a99bf11314

View file

@ -15,13 +15,13 @@ __prompt() {
IFS=';' read -rs -dR -p $'\e[6n' row col >/dev/tty IFS=';' read -rs -dR -p $'\e[6n' row col >/dev/tty
if [[ $col != 1 ]]; then if [[ $col != 1 ]]; then
printf '%s' $'\e[7m%\n\e[0m' printf '%s' $'\e[0;7m%\n\e[0m'
fi fi
PS1='\[\e[0;1m\][' PS1='\[\e[0;1m\]['
case $status in case $status in
0) PS1+='\[\e[36m\]' ;; 0) PS1+='\[\e[32m\]' ;;
*) PS1+='\[\e[31m\]' ;; *) PS1+='\[\e[31m\]' ;;
esac esac