X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=bashrc;h=9224174b3aa29d259d83613f9f9e698efdf58382;hb=15afa01403edd3f93a783fd3e1a6e0c2e6c155bf;hp=e3a01e68eb0235f6d9c63402f4b70650f136977d;hpb=f685cf89a672989d9f135dc0e53682e15d861a76;p=packages%2Fbash.git diff --git a/bashrc b/bashrc index e3a01e6..9224174 100644 --- a/bashrc +++ b/bashrc @@ -3,15 +3,27 @@ # 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|nxterm|xterm*|rxvt*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' + ;; + *) + ;; +esac + PS1="[\u@\h \W]\\$ " +export PS1 alias which="type -p" # SYSTEM WIDE ALIASES ETC. -for i in `find /etc/shrc.d -name '*.sh'` ; do - . $i -done -unset i +if [ "$(echo /etc/shrc.d/*.sh)" != "/etc/shrc.d/*.sh" ]; then + for i in /etc/shrc.d/*.sh; do + . $i + done + unset i +fi + +[ -n "$TERM" -a "$TERM" != "rxvt" ] && tty >/dev/null 2>&1 && \ + tput kbs >/dev/null 2>&1 && stty erase `tput kbs`