# If running interactively, then: if [ "$PS1" != "" -a "$TERM" != "dumb" ] then if [ -d ~/bin ] then export PATH=~/bin:"$PATH" fi # lots of history export HISTCONTROL=ignoredups export HISTCONTROL=ignoreboth export HISTSIZE=1000000 export HISTFILESIZE=1000000 export HISTFILE=~/.bash_history_$USER # append to history file (instead of overwriting) shopt -s histappend # write out history after each command PROMPT_COMMAND='history -a' # colorful grep export GREP_OPTIONS='--color=auto' export GREP_COLOR='1;32' # colorful manpages export LESS_TERMCAP_mb=$'\E[01;31m' export LESS_TERMCAP_md=$'\E[01;36m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m' export LESS='-iFRXM' if [ -e ~/.pythonrc.py ] then export PYTHONSTARTUP=~/.pythonrc.py fi eval "$(dircolors -b)" alias ls='ls --color=auto' alias l='ls -FC --si' alias ll='ls -Fl --si' alias la='ls -FA --si' alias lal='ls -FAl --si' alias duh='du --si' alias dusch='du -sc --si *' alias df='/bin/df --si -lx tmpfs' alias dfn='/bin/df' alias rm='rm -v' alias rmq='/bin/rm' alias rmr='rm -rv' alias rmrq='/bin/rm -r' alias mv='mv -vi' alias cp='cp -vi' alias scr='exec screen -xRR' alias utop='top -u "$USER"' alias diff='diff -u' alias rlm='readlink -m' alias e='exec' # set a useable prompt (colors vary depending on host - thus enabling "subconscious" recognition of the current host) (colors allow for visual separation between command and output seed=$(hostname -f | md5sum | tr -dc '1234567') hc1=${seed:1:1} hc2=${seed:2:1} if which "git" > /dev/zero then PS1="\${debian_chroot:+\[\e[01;31m\](\$debian_chroot)}\[\e[01;3${hc1}m\]\u\[\e[00m\]@\[\e[01;3${hc2}m\]\h\[\e[00m\]: \[\e[01;34m\]\w\[\e[00m\]\n\[\e[00;33m\]\t\[\e[00;32m\](\$? J\j !\! #\#)\[\e[00m\]\$(__git_ps1 ' \[\e[01;30m\](%s) \[\e[00m\]')\\\$ " else PS1="\${debian_chroot:+\[\e[01;31m\](\$debian_chroot)}\[\e[01;3${hc1}m\]\u\[\e[00m\]@\[\e[01;3${hc2}m\]\h\[\e[00m\]: \[\e[01;34m\]\w\[\e[00m\]\n\[\e[00;33m\]\t\[\e[00;32m\](\$? J\j !\! #\#)\[\e[00m\]\\\$ " fi # enable programmable completion features if [ -f /etc/bash_completion ] then source /etc/bash_completion fi fi