通过一些修改让命令行用的更加舒服
- 彩色显示
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
改成
case "$TERM" in
xterm|xterm-color) color_prompt=yes;;
esac
- 提示符另起一行
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]w[ 33[00m]$ '
else
PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '
改成
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}[ 33[01;32m]u@h[ 33[00m]:[ 33[01;34m]w[ 33[00m] $ '
else
PS1='${debian_chroot:+($debian_chroot)}u@h:w $ '