diff options
author | James Meyer <james.meyer@operamail.com> | 2012-08-06 22:29:53 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-08-06 22:29:53 (GMT) |
commit | 249faff8c004ccdf1af87680b2bd684454f96ff9 (patch) | |
tree | baced9c886e422fbafeecc633ac0f195d196531e /abs/core/bash/system.bashrc | |
parent | 999d8e68e11f9676c491540601ae0a191e1fab49 (diff) | |
download | linhes_pkgbuild-249faff8c004ccdf1af87680b2bd684454f96ff9.zip linhes_pkgbuild-249faff8c004ccdf1af87680b2bd684454f96ff9.tar.gz linhes_pkgbuild-249faff8c004ccdf1af87680b2bd684454f96ff9.tar.bz2 |
bash 4.2
Diffstat (limited to 'abs/core/bash/system.bashrc')
-rw-r--r-- | abs/core/bash/system.bashrc | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/abs/core/bash/system.bashrc b/abs/core/bash/system.bashrc index 5430d6b..a2231e8 100644 --- a/abs/core/bash/system.bashrc +++ b/abs/core/bash/system.bashrc @@ -1,31 +1,23 @@ # # /etc/bash.bashrc # -# This file is the systemwide bashrc file. While most of the -# environment is preserved when running an interactive shell -# the PS[1-4] variables, aliases and functions are reset. -# -# When running a non-login shell, apply the following settings: -# - Prompt defaults (PS[1-4], PROMPT_COMMAND) -# - bash_completion if it exists -# - source /etc/bash.bashrc.local + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return PS1='[\u@\h \W]\$ ' PS2='> ' PS3='> ' PS4='+ ' -export PS1 PS2 PS3 PS4 - -if test "$TERM" = "xterm" -o \ - "$TERM" = "xterm-color" -o \ - "$TERM" = "xterm-256color" -o \ - "$TERM" = "rxvt" -o \ - "$TERM" = "rxvt-unicode" -o \ - "$TERM" = "xterm-xfree86"; then - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"' - export PROMPT_COMMAND -fi +case ${TERM} in + xterm*|rxvt*|Eterm|aterm|kterm|gnome*) + PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' + + ;; + screen) + PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' + ;; +esac -[ -r /etc/bash_completion ] && . /etc/bash_completion -[ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local +[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion |