# HG changeset patch # User Edho Arief # Date 1321258125 -10800 # Node ID dde04581a2bfeead72ecdc0517a89129be205e0c # Parent e6de49d70fe7f4a48fe8234169e53ff887c3ca7d Combined PS1 and PROMPT_COMMAND conditional. diff -r e6de49d70fe7 -r dde04581a2bf rc/bash --- a/rc/bash Mon Nov 14 11:06:47 2011 +0300 +++ b/rc/bash Mon Nov 14 11:08:45 2011 +0300 @@ -21,15 +21,6 @@ [ -d "${i}" ] && PATH="${i}:${PATH}" done -case "${TERM}" in - xterm*|dtterm*|screen*) - PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ ' - ;; - *) - PS1='[\u@\h \W]\$ ' - ;; -esac - shopt -s histappend PROMPT_COMMAND='history -a' export HISTFILESIZE=10000 @@ -114,8 +105,12 @@ case "${TERM}" in - xterm*|screen*|dtterm) + xterm*|screen*|dtterm*) PROMPT_COMMAND='echo -ne "\033]0;${LOGNAME}@${HOSTNAME}: ${PWD}\007";'"${PROMPT_COMMAND}" + PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[1;34m\]\W\[\e[0m\]]\$ ' + ;; + *) + PS1='[\u@\h \W]\$ ' ;; esac