Created
February 11, 2013 23:29
-
-
Save joaodubas/4758616 to your computer and use it in GitHub Desktop.
Extension to `.bash_rc`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# environment variables | |
bindir=$HOME/local/bin | |
if [[ ":$PATH:" != *":$bindir:"* ]]; then | |
PATH=$bindir:$PATH | |
export PATH | |
fi | |
# local development | |
export PROJECTS=$HOME/public | |
# virtualenv | |
export WORKON_HOME=$HOME/.venv | |
export PROJECT_HOME=$HOME/www | |
. /usr/local/bin/virtualenvwrapper.sh | |
# todo.txt-cli configuration | |
export TODOTXT_CFG_FILE=$HOME/.todo/todo.cfg | |
. $bindir/todo_completion | |
alias t="todo -d $TODOTXT_CFG_FILE" | |
complete -F _todo t | |
alias punch='/usr/bin/python $bindir/punch' | |
# aliases | |
sublime() { | |
$bindir/sublime $@ & | |
} | |
# update bash path | |
pathup() { | |
local action="$1"; shift | |
case "$action" in | |
popd) | |
[[ $# -eq 0 ]] && builtin popd || builtin popd "$*" ;; | |
cd|pushd) | |
builtin $action "$*" ;; | |
*) | |
return ;; | |
esac | |
PATH=`/usr/bin/python $HOME/.path_env.py` | |
export PATH | |
} | |
alias cd="pathup cd" | |
alias pushd="pathup pushd" | |
alias popd="pathup popd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment