]> git.pld-linux.org Git - packages/bash.git/blobdiff - bashrc
- merged from AC-branch
[packages/bash.git] / bashrc
diff --git a/bashrc b/bashrc
index f6f8d8bf9bdf907b1840e2f9c033caaddb6e5a8b..9224174b3aa29d259d83613f9f9e698efdf58382 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,22 +3,27 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
-# We set PS1 for each terminal:
+# If this is an xterm set the title to user@host:dir
 case $TERM in
-       gnome|xterm*|rxvt)
-               PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
+       gnome|nxterm|xterm*|rxvt*)
+               PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
                ;;
        *)
-               PS1="[\u@\h \W]\\$ "
                ;;
 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
 
-stty erase `tput kbs`
+[ -n "$TERM" -a "$TERM" != "rxvt" ] && tty >/dev/null 2>&1 && \
+       tput kbs >/dev/null 2>&1 && stty erase `tput kbs`
This page took 0.083961 seconds and 4 git commands to generate.