Skip to content

Instantly share code, notes, and snippets.

Victor Klimov skyris

  • Russia
Block or report user

Report or block skyris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gibatronic
gibatronic / workit.bash
Last active Jun 24, 2019
Automatically run workon when entering a directory
View workit.bash
function check_for_virtual_env {
[ -d .git ] || git rev-parse --git-dir &> /dev/null
if [ $? == 0 ]; then
local ENV_NAME=`basename \`pwd\``
if [ "${VIRTUAL_ENV##*/}" != $ENV_NAME ] && [ -e $WORKON_HOME/$ENV_NAME/bin/activate ]; then
workon $ENV_NAME && export CD_VIRTUAL_ENV=$ENV_NAME
fi
elif [ $CD_VIRTUAL_ENV ]; then
You can’t perform that action at this time.