7deae3d4c92fd0fc2c6bd1c6a9d8e3dddef2a424
David Blume first commit

David Blume authored 9 years ago

1) export PS1="\W\$ "
2) 
3) add_to_path() {
4)     if [ -d "$1" ] && [[ ! $PATH =~ (^|:)$1(:|$) ]]; then
5)         PATH+=:$1
6)     fi
7) }
8) 
9) # if this is a CygWin .bashrc, then set CygWin's commands first in PATH
10) # because link.exe and find.exe exist in Windows's path.
11) # Add /usr/lib/lapack at the end so python's numpy can find lapack_lite
12) # (Note: BSD bash, used by OS X doesn't have the "substr" test for expr.)
13) if [[ $(uname -s) == CYGWIN* ]]; then
David Blume Use spaces instead of tabs.

David Blume authored 9 years ago

14)     PATH=/usr/local/bin:/usr/bin:$PATH
15)     PATH=${PATH//":/usr/local/bin:/usr/bin"/} # delete any instances in middle
16)     add_to_path /usr/lib/lapack
17)     ulimit -n 1024 # for "duplicity"
David Blume first commit

David Blume authored 9 years ago

18) fi
19) 
20) # change the color of directories in the ls command 
David Blume Refactor .bashrc to keep di...

David Blume authored 9 years ago

21) if [[ $(uname -s) == Darwin* ]]; then
22)     export LSCOLORS=gxfxcxdxbxegedabagacad
23)     export CLICOLOR=1
24) else
25)     # After executing: dircolors -p > .dircolors
26)     # Lighten the color of directories from blue to light blue
27)     # sed -i '/# directory/c\DIR 00;36 # directory' .dircolors
28)     if [ -x /usr/bin/dircolors ]; then
29)         test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
30)         alias ls='ls --color=auto'
31)     fi
David Blume first commit

David Blume authored 9 years ago

32) fi
33) 
David Blume Add alias for colors in ls...

David Blume authored 9 years ago

34) alias grep='grep --color=auto'
35) alias fgrep='fgrep --color=auto'
36) alias egrep='egrep --color=auto'
37) 
38) # colored GCC warnings and errors
39) export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
40) 
David Blume first commit

David Blume authored 9 years ago

41) # Add to PATH only if not already in PATH.
42) add_to_path $HOME/bin
43) 
44) alias findinpyfiles="find . -name \*.py -print0 | xargs -0 grep -nI"