bash: better prompt
This commit is contained in:
parent
b66591d2cb
commit
a99bf11314
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue