Aggiungi 'etc/profile.d/ps1.container'

main
sam 3 years ago
parent a8096bff28
commit d41365f34f

@ -0,0 +1,24 @@
. /etc/server
. /etc/profile.d/bash_colors
PS1_SHELL=${SHELL:5}
PRIV_CHECK=$(cat /proc/self/uid_map|awk '{print $2}')
if [ $PRIV_CHECK -eq 0 ]; then
PRIV=priv
PRIV_COLOR_BASH=$purple
PRIV_COLOR_ZSH=magenta
else
PRIV=unpriv
PRIV_COLOR_BASH=$cyan
PRIV_COLOR_ZSH=cyan
fi
if [ $(id -u) -eq 0 ]; then
USER_COLOR_BASH=$red
USER_COLOR_ZSH=red
else
USER_COLOR_BASH=$blue
USER_COLOR_ZSH=blue
fi
export PS1_BASH="$red$HOST$white::$green$SYSTEM$white<$PRIV_COLOR_BASH$PRIV$white>:$USER_COLOR_BASH\u$white@\h $blue\w $white|${yellow}bash$white| # "
export PS1_ZSH="%F{red}$HOST%f::%F{green}$SYSTEM%f<%F{$PRIV_COLOR_ZSH}$PRIV%f>:$%B%F{$USER_COLOR_ZSH}%(?..%? )%f%b%B%F{$USER_COLOR_ZSH}%n%f%b@%m %B%F{blue}%40<..<%~%<< %f|%F{yellow}zsh%f| %f%b%# "
Loading…
Cancel
Save