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

  • 彩色显示
  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\$ '




相关文章:

  • 2022-01-27
  • 2021-05-17
  • 2022-12-23
  • 2022-01-29
  • 2021-07-20
  • 2021-06-01
猜你喜欢
  • 2021-08-17
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
相关资源
相似解决方案