gnome-terminal的一些调整

时间:2014-11-29 22:48:59   收藏:0   阅读:524

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

  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)


原文:http://www.cnblogs.com/joyzhuang/p/4132045.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!