This commit is contained in:
Hans Wurst
2015-07-31 02:34:53 +02:00
parent d02a7cedc8
commit 4d9533ca0a
161 changed files with 248 additions and 30687 deletions

View File

@@ -20,16 +20,32 @@ fi
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
# Enable history appending instead of overwriting. #139609
# Disable completion when the input buffer is empty. i.e. Hitting tab
# and waiting a long time for bash to expand all of $PATH.
shopt -s no_empty_cmd_completion
# Enable history appending instead of overwriting when exiting. #139609
shopt -s histappend
# Save each command to the history file as it's executed. #517342
# This does mean sessions get interleaved when reading later on, but this
# way the history is always up to date. History is not synced across live
# sessions though; that is what `history -n` does.
# Disabled by default due to concerns related to system recovery when $HOME
# is under duress, or lives somewhere flaky (like NFS). Constantly syncing
# the history will halt the shell prompt until it's finished.
#PROMPT_COMMAND='history -a'
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PS1='\[\033]0;\u@\h:\w\007\]'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
PS1='\[\033k\u@\h:\w\033\\\]'
;;
*)
unset PS1
;;
esac
@@ -60,9 +76,9 @@ if ${use_color} ; then
fi
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
alias ls='ls --color=auto'
@@ -72,11 +88,15 @@ if ${use_color} ; then
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='\u@\h \W \$ '
PS1+='\u@\h \W \$ '
else
PS1='\u@\h \w \$ '
PS1+='\u@\h \w \$ '
fi
fi
for sh in /etc/bash/bashrc.d/* ; do
[[ -r ${sh} ]] && source "${sh}"
done
# Try to keep environment pollution down, EPA loves us.
unset use_color safe_term match_lhs
unset use_color safe_term match_lhs sh