change prompt color

This commit is contained in:
luk
2026-08-22 00:23:16 +08:00
parent 7eaf349741
commit 5c56f53e32

View File

@@ -143,9 +143,8 @@ elif [ -f /etc/debian_version ]; then
elif [ -f /etc/ubuntu_version ]; then elif [ -f /etc/ubuntu_version ]; then
MYOSVERSION=Ubt`cat /etc/ubuntu_version 2>/dev/null` MYOSVERSION=Ubt`cat /etc/ubuntu_version 2>/dev/null`
fi fi
# \w shows absolute path, \W shows current folder.
if [ "$color_prompt" = yes ]; then if [ "$color_prompt" = yes ]; then
PS1='\n¶ \[\033[$PSTYLE;${PTYPE}2m\]\t\[\033[00m\] \[\033[$PSTYLE;${PTYPE}5m\]\u\[\033[00m\] @\[\033[$PSTYLE;${PTYPE}1m\]\h\[\033[00m\] =\[\033[$PSTYLE;${PTYPE}3m\]$MYIPPUB\[\033[00m\] #\[\033[$PSTYLE;${PTYPE}5m\]$(uname -m),$(uname),$MYOSVERSION\[\033[00m\] \[\033[$PSTYLE;${PTYPE}7m\]$(realpath \w)/\[\033[00m\] \n§ \[\033[00;47m\]\W/\[\033[00m\] ' PS1='\n¶ \[\033[$PSTYLE;${PTYPE}2m\]\t\[\033[00m\] \[\033[$PSTYLE;${PTYPE}5m\]\u\[\033[00m\] @\[\033[$PSTYLE;${PTYPE}2m\]\h\[\033[00m\] =\[\033[$PSTYLE;${PTYPE}5m\]$MYIPPUB\[\033[00m\] #\[\033[$PSTYLE;${PTYPE}2m\]$(uname -m),$(uname),$MYOSVERSION\[\033[00m\] \[\033[$PSTYLE;${PTYPE}5m\]$(realpath \w)/\[\033[00m\] \n§ \[\033[00;41m\]\W/\[\033[00m\] '
else else
PS1='\n¶ \t \u @\h =$MYIPPUB #$(uname -m),$(uname),$MYOSVERSION $(realpath \w)/ \n§ \W/ ' PS1='\n¶ \t \u @\h =$MYIPPUB #$(uname -m),$(uname),$MYOSVERSION $(realpath \w)/ \n§ \W/ '
fi fi