]> git.ipfire.org Git - people/ms/ipfire-3.x.git/commitdiff
setup: Update /etc/bashrc.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 20 Sep 2012 16:23:13 +0000 (16:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 20 Sep 2012 16:23:13 +0000 (16:23 +0000)
setup/bashrc
setup/setup.nm

index 1d0dc1b44223d28662627e333baa47a663c70603..901f5d57f8b242febca56a6168dde6e02cf1aa3d 100644 (file)
 
 # are we an interactive shell?
 if [ "$PS1" ]; then
+  if [ -z "$PROMPT_COMMAND" ]; then
     case $TERM in
     xterm*)
-        if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
-            PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
-        else
-            PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
-        fi
-        ;;
+      if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
+          PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
+      else
+          PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
+      fi
+      ;;
     screen)
-        if [ -e /etc/sysconfig/bash-prompt-screen ]; then
-            PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
-        else
-            PROMPT_COMMAND='printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
-        fi
-        ;;
+      if [ -e /etc/sysconfig/bash-prompt-screen ]; then
+          PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
+      else
+          PROMPT_COMMAND='printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
+      fi
+      ;;
     *)
-        [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
-        ;;
+      [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
+      ;;
     esac
-    # Turn on checkwinsize
-    shopt -s checkwinsize
-    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
-    # You might want to have e.g. tty in prompt (e.g. more virtual machines)
-    # and console windows
-    # If you want to do so, just add e.g.
-    # if [ "$PS1" ]; then
-    #   PS1="[\u@\h:\l \W]\\$ "
-    # fi
-    # to your custom modification shell script in /etc/profile.d/ directory
+  fi
+  # Turn on parallel history
+  shopt -s histappend
+  history -a
+  # Turn on checkwinsize
+  shopt -s checkwinsize
+  [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
+  # You might want to have e.g. tty in prompt (e.g. more virtual machines)
+  # and console windows
+  # If you want to do so, just add e.g.
+  # if [ "$PS1" ]; then
+  #   PS1="[\u@\h:\l \W]\\$ "
+  # fi
+  # to your custom modification shell script in /etc/profile.d/ directory
 fi
 
 if ! shopt -q login_shell ; then # We're not a login shell
@@ -73,12 +78,12 @@ if ! shopt -q login_shell ; then # We're not a login shell
             if [ "$PS1" ]; then
                 . "$i"
             else
-                . "$i" >/dev/null 2>&1
+                . "$i" >/dev/null
             fi
         fi
     done
 
     unset i
-    unset pathmunge
+    unset -f pathmunge
 fi
 # vim:ts=4:sw=4
index 0eb5c9911d0a6c646b15430d6d4342e656770fca..a62230088a75c019b983feabac4900b4a69c6307 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = setup
 version    = 3.0
-release    = 5
+release    = 6
 arch       = noarch
 
 groups     = Base Build System/Base