gnome-terminal的一些调整

通过一些修改让命令行用的更加舒服

  • 彩色显示
  1. case "$TERM" in
  2. xterm-color) color_prompt=yes;;
  3. esac

改成

  1. case "$TERM" in
  2. xterm|xterm-color) color_prompt=yes;;
  3. esac
  • 提示符另起一行
  1. if [ "$color_prompt" = yes ]; then
  2.     PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m]$ '
  3. else
  4.     PS1='${debian_chroot:+($debian_chroot)}u@h:w$ '

改成

  1. if [ "$color_prompt" = yes ]; then
  2.     PS1='${debian_chroot:+($debian_chroot)}[33[01;32m]u@h[33[00m]:[33[01;34m]w[33[00m] $ '
  3. else
  4.     PS1='${debian_chroot:+($debian_chroot)}u@h:w $ '




原文地址:https://www.cnblogs.com/joyzhuang/p/4132045.html