b424553e2007894bd808fd8eca8955d0434773d9
[cmccabe-etc] / .bashrc
1 # .bashrc
2
3 # Source global definitions
4 if [ -f /etc/bashrc ]; then
5         . /etc/bashrc
6 fi
7
8 if [ -f ~/.bashrc-local ]; then
9         . ~/.bashrc-local
10 fi
11
12 xlock2() {
13         ps aux | grep -v grep | grep xscreensaver > /dev/null
14         if [ $? -ne 0 ]; then
15                 echo "starting xscreensaver..."
16                 xscreensaver &
17         fi
18         until xscreensaver-command -lock; do
19                 sleep 1
20         done
21 }
22
23 case $- in
24 *i*)
25         # interactive shell
26         ls --color /tmp &>/dev/null && alias ls='ls --color=auto'
27         alias mv='mv -i'
28         alias vi='vim'
29         alias wget='wget --user-agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"'
30         alias grep='grep --color=tty -d skip'
31         alias bterm='xterm -fn "-adobe-courier-bold-r-normal--34-240-100-100-m-200-iso8859-1" -geometry 60x30-50-50'
32         alias mplayer="mplayer -fs -ac a52,"
33         export PATH="${PATH}:${HOME}/cmccabe-bin"
34     [ -d "${HOME}/cmccabe-hbin" ] && export PATH="${PATH}:${HOME}/cmccabe-hbin"
35         export EDITOR="/usr/bin/vim"
36         export CSCOPE_EDITOR="${EDITOR}"
37         ;;
38 *)
39         # non-interactive shell
40         ;;
41 esac
42
43 # Perturb malloc so that we spot bugs quicker!
44 export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
45
46 # Do not add lines that begin with a space to the history
47 export HISTIGNORE="[ ]*"
48
49 # Append history list of current session to HISTFILE
50 shopt -s histappend