dotfiles / profile

# The all-mighty profile!
#  It will always get loaded before the zshrc or bashrc
#   (or, at least, bashrc and zshrc will source it)

[[ "${PROFILE_LOADED-}" ]] && return 0

#export ECF="woleverd@p`expr '(' $RANDOM % 5 ')' + 1`"
export ECF=""
export ES=""
export ESOFFICE=""
export CDF=""
export CS=""
export SWC=""
export TB=""
export NFS=""
export BASIE="-p42"

export PIP_DOWNLOAD_CACHE="$HOME/.pip/cache/"
[[ ! -d "$PIP_DOWNLOAD_CACHE" ]] && mkdir -p "$PIP_DOWNLOAD_CACHE"

export NNTPSERVER=''

export NAME="David Wolever"
export EDITOR="vim"
export PYTHONSTARTUP=~/.pythonrc
export LANG="en_US.UTF-8"
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
export HISTIGNORE="&:bg:fg:exit"
export HISTFILESIZE=10000

# These should be local on machines that don't like the mac's terminal
#export TERM="xterm-color" 
#export TERMINFO="$HOME/.terminfo"

function rmext () {
    find . -name "*.$1" | head
    echo "Remove all .$1 files?"
    read RESP
    [[ "$RESP" =~ [nN] ]] && { echo "Abort."; return 1; }
    find . -name "*.$1" -delete

alias at="at -v"
alias ls="ls --color=auto"
alias la="ls -alh"
alias grep="grep --color=auto --exclude='*.svn*'"
alias resize="resize; clear"
alias ut="tar -xvf"
alias py="python"
alias ipy="ipython"
alias dj="django"
alias go="ssh"
alias rmorig="rmext orig"
alias rmrej="rmext rej"
alias fakesmtpd="python -m smtpd -n -c DebuggingServer localhost:2525"

alias glog="hg glog | less"
alias viq="vim \$(hg root)/.hg/patches/series"
for HGCMD in tip qimport qser qpo qpop qpu qpush qfin qref qnew qrm qmv di ci qdi st rebase pull nudge sum co bm
    alias $HGCMD="hg $HGCMD"
alias push="hg nudge"

# Add our own bin/ directory to PATH
export PATH="$HOME/.bin:$PATH"

. ~/.profile.local