3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 9645
/ 1 Year ago, mon, february 6, 2023, 9:55:08
I have changed PS1 variable in /etc/bash.bashrc
to
PS1="
[033[0;37m]342224214342224200$(if [[ $? == 0 ]]; then echo "[[033[0;32m][033[01;32m]342234223[033[0;37m]]342224200"; else echo "[[033[0;32m][033[01;31m]342234227[033[0;37m]]342224200"; fi)[$(if [[ ${EUID} == 0 ]]; then echo '[033[0;31m]h'; else echo '[033[0;33m]u[033[0;37m]@[033[0;96m]h'; fi)[033[0;37m]]342224200[[033[0;32m]w[033[0;37m]]
[033[0;37m]342224224342224200342224200342225274 [033[0m]"
Which works fine with all the commands. But when I run sudo -i
command, PS1 value goes to the default. To get back the color scheme, I have to run PS1=<same value>
manually. Any idea what might be causing this behaviour?
More From » command-line