X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=bashrc;h=10de41f8e12464875e5f6ac3dda1c33d0f561588;hb=4953ff2aa792ac4824607513b1bffbf5e6cc83f7;hp=4357636b251ab0a130dbcd0003cde549f34c9d19;hpb=15b916febb0a098c53db915b5d27b601b7b3ab1d;p=packages%2Fbash.git diff --git a/bashrc b/bashrc index 4357636..10de41f 100644 --- a/bashrc +++ b/bashrc @@ -3,15 +3,22 @@ # System wide functions and aliases # Environment stuff goes in /etc/profile -# For some unknown reason bash refuses to inherit -# PS1 in some circumstances that I can't figure out. -# Putting PS1 here ensures that it gets loaded every time. +# If this is an xterm set the title to user@host:dir +case $TERM in + gnome|xterm*|rxvt*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' + ;; + *) + ;; +esac PS1="[\u@\h \W]\\$ " alias which="type -p" -for i in /etc/shrc.d/*.sh ; do - if [ -x $i ]; then +# SYSTEM WIDE ALIASES ETC. +if [ "$(echo /etc/shrc.d/*.sh)" != "/etc/shrc.d/*.sh" ]; then + for i in /etc/shrc.d/*.sh; do . $i - fi -done + done + unset i +fi