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)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  3. else
  4.     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

改成

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


来自为知笔记(Wiz)

相关内容

    暂无相关文章