From: Michael Tremer Date: Thu, 20 Sep 2012 16:23:13 +0000 (+0000) Subject: setup: Update /etc/bashrc. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9233291e08e5c97925b07f19e2e144b424bd7eba;p=ipfire-3.x.git setup: Update /etc/bashrc. --- diff --git a/setup/bashrc b/setup/bashrc index 1d0dc1b44..901f5d57f 100644 --- a/setup/bashrc +++ b/setup/bashrc @@ -10,35 +10,40 @@ # 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 diff --git a/setup/setup.nm b/setup/setup.nm index 0eb5c9911..a62230088 100644 --- a/setup/setup.nm +++ b/setup/setup.nm @@ -5,7 +5,7 @@ name = setup version = 3.0 -release = 5 +release = 6 arch = noarch groups = Base Build System/Base