瀏覽代碼

simplify prompt

pull/1/head
10sr 12 年之前
父節點
當前提交
0ac3ae8b45
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      bashrc

+ 4
- 2
bashrc 查看文件

@@ -63,6 +63,9 @@ fi

uname -a

echo
echo TERM $TERM on $(tty), running $BASH $BASH_VERSION
echo

if [ "${EMACS}" = "t" ]; then # for emacs shell
true export PS1="\u@\H \d \t \w\nemacs shell\$ "
@@ -446,10 +449,9 @@ __my_prompt_function(){ # used by PS1
test -f $bst && local battery="[Battery:$(sed -e 's`%`%%`g' $bst)]"
battery-status %s >$bst &
fi
local tty=$(__try_exec tty | sed -e 's:/dev/::')
# local battery=$(battery-state [%s] | sed -e 's`%`%%`g') # very slow
printf " [${c1}${pwd}${cdef}<${c3}${oldpwd}${cdef}]${git}${svn}${battery}${ip}\n"
printf "${c2}${USER}@${HOSTNAME}${cdef} ${tty} ${date} ${BASH} ${BASH_VERSION}\n"
printf "${c2}${USER}@${HOSTNAME}${cdef} ${date}\n"
printf "shlv:${SHLVL} jobs:${jobnum} last:${lastreturn} "

TERMTITLE="${USER}@${HOSTNAME} ${PWD}"


Loading…
取消
儲存