Fix a typo.
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
6 export DOTROOT=$HOME/var/srv/hg.gomaa.us/dotfiles
13 if ! echo $PYTHONPATH | /bin/egrep -q "(^|:)$1($|:)" ; then
14 if [ "$2" = "after" ] ; then
15 PYTHONPATH=$PYTHONPATH:$1
17 PYTHONPATH=$1:$PYTHONPATH
26 if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
27 if [ "$2" = "after" ] ; then
34 PYTHON_VERSION=`python -V 2>&1 | awk '{print $2}' | awk -F . '{print $1"."$2}'`
37 add_to_pythonpath ~/var/lib/python$PYTHON_VERSION/site-packages
38 add_to_pythonpath ~/.local/lib/python$PYTHON_VERSION/site-packages
39 add_to_pythonpath ~/.local/lib
40 add_to_pythonpath $DOTROOT/python
41 add_to_path /usr/local/sbin
45 add_to_path ~/.local/bin
47 add_to_path $DOTROOT/bin
48 add_to_path ~/.ec2/bin
49 add_to_path /usr/local/bin
52 add_to_path /usr/games
53 export TEXINPUTS=$TEXINPUTS:~/.lib/tex:~/share/tex:.:~/.lib/tex:~/share/tex:.:~/.lib/tex:~/share/tex:.:~/.lib/tex:~/share/tex
54 export PYTHONSTARTUP=~/.pythonrc.py
55 # Syntax-highlighting less.
56 LESS='-R'; export LESS
57 export LESSOPEN="| lesspipe %s"
59 export WORKON_HOME=$HOME/.virtualenvs
65 local path=$base/$fname
69 export FUZZYFIND_PATH=$path
73 # This is probably me revealing my lack of bash-fu.
76 export FUZZYFIND_PATH=$path
87 if [ "$?" -eq "0" ]; then
88 if [ "$TERM" = "screen" ]; then
89 # Set the title to whatever project I'm working on, if in
93 local new_path=$FUZZYFIND_PATH
97 echo "Unable to find $1/$2 or similar"
103 fuzzyfind-frontend ~/var/srv $1
108 grep --color="auto" -Ri --include="*.py" $1 ./
112 # Seems like loop time.
114 if [ -f ~/.bash_local ]; then
118 if [ -f ~/.bash_aliases ]; then
122 if [ -f $DOTROOT/.bash.d/mercurial_completion ]; then
123 . $DOTROOT/.bash.d/mercurial_completion
126 if [ -f $DOTROOT/.bash.d/virtualenvwrapper_bashrc ]; then
127 . $DOTROOT/.bash.d/virtualenvwrapper_bashrc
132 # If not running interactively, don't do any more.
133 [ -z "$PS1" ] && return
135 # don't put duplicate lines in the history, and ignore same sucessive entries.
136 export HISTCONTROL=ignoreboth
137 export EDITOR=emacsclient
139 # check the window size after each command and, if necessary,
140 # update the values of LINES and COLUMNS.
141 shopt -s checkwinsize
144 # enable color support of ls and also add handy aliases
145 if [ "$TERM" != "dumb" ]; then
146 eval "`dircolors -b`"
147 alias ls='ls --color=auto'
148 #alias dir='ls --color=auto --format=vertical'
149 #alias vdir='ls --color=auto --format=long'
160 local last=${PWD/#*\//}
161 echo -n $PWD | sed -e "s|^$HOME|~|" \
162 -e 's-/\([^/]\{2\}\)\([^/]*\)-/\1-g' \
185 YELLOW=`tput setaf 3`
187 MAGENTA=`tput setaf 5`
192 GREEN_PS1='\[$GREEN\]\[$BOLD\]$(_ident)\[$RESET\]\[$MAGENTA\]$(_prompt_pwd)/\[$GREEN\]\$\[$RESET\] '
193 YELLOW_PS1='\[$GREEN\]\[$BOLD\]$(_ident)\[$RESET\]\[$MAGENTA\]$(_prompt_pwd)/\[$YELLOW\]\$\[$RESET\] '
199 if [ "$STY" = "" ]; then
206 if [ `_inside_screen` = "true" ]; then
214 if [ `_inside_screen` = "true" ]; then
215 echo "$(hostname)($STY)"
223 expr "$STY" : '[0-9]*\.\([a-z\.]*\)'
225 mkdir -p ~/.bash_history.d
227 if [ `_inside_screen` = "true" ]; then
228 # If I'm inside screen, set the caption to show STY so I know
230 screen -X caption always "$STY %= %-w%L>%{= BW}%n*%t%{-}%52<%+w %L="
231 export HISTFILE=~/.bash_history.d/`_screen_name`.$WINDOW
234 [[ -n "$(command -v stty)" ]] && stty -ixoff -ixon