# Programmable completion if [ -f /etc/bash_completion -a $(complete | wc -l) -lt 50 ]; then . /etc/bash_completion fi # Use cdargs example script if available if test -f /usr/share/doc/cdargs/examples/cdargs-bash.sh; then . /usr/share/doc/cdargs/examples/cdargs-bash.sh fi # Source global definitions [ -f /etc/bashrc ] && source /etc/bashrc # Enter your ssh private key passphrase only once per session if [ -x /usr/bin/keychain ] && [ -r ~/.ssh/id_dsa ]; then /usr/bin/keychain --quiet ~/.ssh/id_dsa . ~/.keychain/${HOSTNAME}-sh fi # Don't quite bash on ctrl-d set -o ignoreeof # Notice when the window resizes and don't screw up the console shopt -s checkwinsize # Don't freak out when I hit tab on an empty line shopt -s no_empty_cmd_completion # Correct minor spelling errors in `cd` shopt -s cdspell # If my `cd` target doesn't exist, treat it as a variable whose # value is the directory I want shopt -s cdable_vars # If I uninstall an app and reinstall it, say from source, into a # new path, say /usr/local/bin, find it rather than assuming it # doesn't exist just because the hash table entry is now wrong shopt -s checkhash # If I have jobs running when I exit the shell, send them a HUP shopt -s huponexit # Mmmm... case-insensitive filename expansion # shopt -s nocaseglob # Some things just waste space in the history export HISTIGNORE="$HISTIGNORE:ls:cd:exit:clear" # Like duplicates export HISTCONTROL=ignoredups # Or whatever you like export EDITOR="vim" # Or "more" or "most"... export PAGER="less" # Feel free to change to "gvim", svn tries to use it and I hate that export VISUAL="vim" # You should probably change this export EMAIL="grasshopper@linuxkungfu.org" # Nice for viewing man pages export MANPAGER="col -b | view -c 'set ft=man nolist' -c 'map q :q' -" # Iffy for security reasons, but I like to have this export PATH="$PATH:~/bin" # I don't need to know about new mail on the local machine unset MAILCHECK # ls is a lot easier to read with colors alias ls='ls --color=auto' # We're supposed to memorize this stuff? I keep this here as # a reference and to use if I want to play with $PS1 red='\e[0;31m' RED='\e[1;31m' blue='\e[0;34m' BLUE='\e[1;34m' cyan='\e[0;36m' CYAN='\e[1;36m' NC='\e[0m' # No Color