通过一些修改让命令行用的更加舒服
- 彩色显示
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)}\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ‘
else
PS1=‘${debian_chroot:+($debian_chroot)}\[email protected]\h:\w\$ ‘
改成
if [ "$color_prompt" = yes ]; then
PS1=‘${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ ‘
else
PS1=‘${debian_chroot:+($debian_chroot)}\[email protected]\h:\w\n\$ ‘
时间: 2024-10-09 06:50:37