|
|
发表于 2008-2-24 21:36:17
|
显示全部楼层
Post by jarryson;1819646
果然字体间距好多了,对了,能给我个bash里面类似[xx@myhost ~]$的配色么,这东西不好搜,我用基于vte的terminal
我的设置是UID为0时不显示用户名(大多数机器上都是叫root,没必要显示,除非你改过),以红色显示主机名(有点警告的意思,告诉你现在正在使用root用户进行操作),蓝色显示当前目录。
如果是普通用户则会以绿色显示用户名和主机名,蓝色显示当前目录。
还有几个针对sudo的alias,你可以自己加一些,比如sudo abs,sudo pacman。
~/.bashrc- if [ -f /etc/bash_completion ]; then
- . /etc/bash_completion
- fi
- if [ ${EUID} = 0 ]; then
- PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
- alias cnc='pppoe-start'
- else
- PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \W \$\[\033[00m\] '
- alias reboot='sudo reboot'
- alias halt='sudo halt'
- alias cnc='sudo pppoe-start'
- fi
- alias ls='ls -p --color=auto'
- alias rm='rm -i'
- alias cp='cp -i'
- alias mv='mv -i'
- alias ll='ls -hl --color=auto'
- alias la='ls -a'
- alias grep='grep --color=auto'
- alias less='less -R'
- alias vi='vim'
- export LESS_TERMCAP_mb=$'\E[01;31m'
- export LESS_TERMCAP_md=$'\E[01;31m'
- export LESS_TERMCAP_me=$'\E[0m'
- export LESS_TERMCAP_se=$'\E[0m'
- export LESS_TERMCAP_so=$'\E[01;44;33m'
- export LESS_TERMCAP_ue=$'\E[0m'
- export LESS_TERMCAP_us=$'\E[01;32m'
复制代码 |
|