74 lines
1.6 KiB
Bash
74 lines
1.6 KiB
Bash
# ~/.bashrc: executed by bash(1) for non-login shells.
|
|
|
|
# If not running interactively, don't do anything
|
|
case $- in
|
|
*i*) ;;
|
|
*) return;;
|
|
esac
|
|
|
|
# History
|
|
HISTCONTROL=ignoreboth
|
|
shopt -s histappend
|
|
HISTSIZE=99999999
|
|
HISTFILESIZE=99999999
|
|
HISTTIMEFORMAT="%Y-%m-%d %T "
|
|
PROMPT_COMMAND='history -a'
|
|
shopt -s checkwinsize
|
|
|
|
# Debian chroot prompt helper
|
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
|
debian_chroot=$(cat /etc/debian_chroot)
|
|
fi
|
|
|
|
# Terminalfarben prüfen
|
|
case "$TERM" in
|
|
xterm-color|*-256color) color_prompt=yes;;
|
|
esac
|
|
|
|
if [ -n "$force_color_prompt" ]; then
|
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
|
color_prompt=yes
|
|
else
|
|
color_prompt=
|
|
fi
|
|
fi
|
|
|
|
# Prompt
|
|
export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
|
|
|
|
# xterm/rxvt Fenstertitel
|
|
case "$TERM" in
|
|
xterm*|rxvt*)
|
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
# LS-Farben & dircolors
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
export LS_OPTIONS='--color=auto -h'
|
|
fi
|
|
|
|
# Bash-Completion
|
|
if ! shopt -oq posix; then
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
. /usr/share/bash-completion/bash_completion
|
|
elif [ -f /etc/bash_completion ]; then
|
|
. /etc/bash_completion
|
|
fi
|
|
fi
|
|
|
|
# Persönliches bin-Verzeichnis
|
|
export PATH="$HOME/bin:$PATH"
|
|
|
|
# Aliase auslagern
|
|
if [ -f ~/.bash_aliases ]; then
|
|
. ~/.bash_aliases
|
|
fi
|
|
|
|
# env auslagern
|
|
if [ -f ~/.bash_env ]; then
|
|
. ~/.bash_env
|
|
fi |