]> git.pld-linux.org Git - packages/bash.git/blobdiff - bashrc
- up to 4.3 (pl.po looks up to date, so disable patch)
[packages/bash.git] / bashrc
diff --git a/bashrc b/bashrc
index 8edf0b5717c07e25dcea0825ca31bbf1f9e799c6..5ef300fb445ea311b3f75044796ac68387864520 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,16 +3,23 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
-# We set PS1 for each terminal:
+# Test for an interactive shell.  There is no need to set anything
+# past this point for scp and rcp, and it's important to refrain from
+# outputting anything in those cases.
+if [[ $- != *i* ]] ; then
+       # Shell is non-interactive.  Be done now!
+       return
+fi
+
+# If this is an xterm set the title to user@host:dir
 case $TERM in
-       gnome|nxterm|xterm*|rxvt)
-               PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
+       gnome*|nxterm|xterm*|rxvt*|konsole*)
+               PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
                ;;
        *)
-               PS1="[\u@\h \W]\\$ "
                ;;
 esac
-export PS1
+PS1="[\u@\h \W]\\$ "
 
 alias which="type -p"
 
@@ -23,5 +30,3 @@ if [ "$(echo /etc/shrc.d/*.sh)" != "/etc/shrc.d/*.sh" ]; then
        done
        unset i
 fi
-
-[ -n "$TERM" ] && tty >/dev/null 2>&1 && stty erase `tput kbs`
This page took 0.037302 seconds and 4 git commands to generate.