From b409ffadeff6099499e96e32e851c3047d05c9a2 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Mon, 18 Nov 2013 19:26:45 +0100 Subject: [PATCH] virtualenv helper --- .bash_aliases | 11 +++++++++++ .bashrc | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 048f123..3ede194 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -20,3 +20,14 @@ alias weechat='TERM=screen-256color weechat' alias lock='xscreensaver-command --lock' alias meteo='curl -s --user-agent "USER FUCKING AGENT" "http://thefuckingweather.com/?where=Paris" | grep "

" | sed -r "s/.*>(.*)<.*/\1 OUTSIDE\!/g"' + +fliptable() { echo "(╯°□°)╯ ┻━┻"; } + +# Usage: venv project_name +# Activate the python virtualenv for . +venv() +{ + if [ -f "${HOME}/venvs/$1/bin/activate" ]; then + . "${HOME}/venvs/$1/bin/activate" + fi +} diff --git a/.bashrc b/.bashrc index 6d762ea..44ab375 100644 --- a/.bashrc +++ b/.bashrc @@ -76,9 +76,6 @@ if hash rbenv 2>/dev/null; then eval "$(rbenv init -)" fi -# Misc utilities -fliptable() { echo "(╯°□°)╯ ┻━┻"; } - # GPG Agent if [ -f "${HOME}/.gpg-agent-info" ]; then . "${HOME}/.gpg-agent-info"