CL="/[/e[0m/]"
GREEN="$CL/[/e[0;32m/]"
BGREEN="$CL/[/e[0;32;1m/]"
XORG="$CL/[/e[0;36m/]"
XRED="$CL/[/e[0;35m/]"
BRED="$CL/[/e[0;35;1m/]"
ORG="$CL/[/e[0;33m/]"
DARK_GRAY="$CL/[/e[1;30m/]"
BLUE="$CL/[/e[1;34m/]"
PROMPT_COMMAND='
NTTY=$(tty | cut -d"/" -f3-4)
LS=$(ls | wc -l)
LSA=$(ls -a | wc -l)
L1a="$BLUE[$BGREEN/u$GREEN@/H:$NTTY/s$BLUE]"
L1b="$ORG/t"
L1c="$BLUE<$XRED/w$BLUE>($DARK_GRAY$LS/$LSA$BLUE)"
L2="$BRED///$$CL"
export PS1="$L1a $L1b $L1c/n$L2 "
#export PS1="[/u@/H:$NTTY/s] /t </w>($LS/$LSA)/n//$ "
'
运行效果如图
GREEN="$CL/[/e[0;32m/]"
BGREEN="$CL/[/e[0;32;1m/]"
XORG="$CL/[/e[0;36m/]"
XRED="$CL/[/e[0;35m/]"
BRED="$CL/[/e[0;35;1m/]"
ORG="$CL/[/e[0;33m/]"
DARK_GRAY="$CL/[/e[1;30m/]"
BLUE="$CL/[/e[1;34m/]"
PROMPT_COMMAND='
NTTY=$(tty | cut -d"/" -f3-4)
LS=$(ls | wc -l)
LSA=$(ls -a | wc -l)
L1a="$BLUE[$BGREEN/u$GREEN@/H:$NTTY/s$BLUE]"
L1b="$ORG/t"
L1c="$BLUE<$XRED/w$BLUE>($DARK_GRAY$LS/$LSA$BLUE)"
L2="$BRED///$$CL"
export PS1="$L1a $L1b $L1c/n$L2 "
#export PS1="[/u@/H:$NTTY/s] /t </w>($LS/$LSA)/n//$ "
'
运行效果如图