screen
改一下 ~/.bashrc
GITPS1=’$(__git_ps1 " (%s)")’
case “$TERM” in
xterm*|rxvt*)
PS1="${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]${GITPS1}$ “
PS1=”[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"
;;
screen*)
PS1="${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]${GITPS1}$ “
PATHTITLE=’[\ek\W\e\]’
# Use program name as title
PROGRAMTITLE=’[\ek\e\]’
PS1="${PROGRAMTITLE}${PATHTITLE}${PS1}"
;;
*)
;;
esac
小抄一下別人的 ~/.screenrc
# Caption line
#caption always “%{= R}[ %{=b b}%-w%{=rb db}%>%n %t%{-}%+w%{-b}%< %=%{R}][%{M} %Y-%m-%d %{G}%c%{R}]"
caption always “%{=b k}%{b y} %m-%d %c / %{k}%L=%-w%7>%{g}%n %t%{-}%+w%-014< %-016=%{c} %l “
# Set default encoding using utf8
defutf8 on
# Refresh the display when exiting programs
altscreen on
# Dynamic title
shelltitle ‘$ |bash’
# Set xterm’s title
hardstatus string “screen: %t”
# C-a b –(switch to)–> view big5 data
bind b encoding big5 utf8
# C-a u –(switch to)–> view utf8 data
bind u encoding utf8 utf8
參考
http://adam8157.info/blog/2010/05/terminal-bash-screen/
http://archerworks.blogspot.com/2010/05/linuxscreenbindkey.html
這樣,顏色,還有訊息都豐富了,不會逛到哪一台主機 git 到哪一個 branch 都分不出來