Assuming that you're actually running bash
rather than csh
, the script you want to look at is yourvirtualenv/bin/activate
(not yourvirtualenv/bin/activate.csh
), which defines a function called deactivate
, not an alias. You can see this with the type
command:
$ type deactivate
deactivate is a function
deactivate ()
{
typeset env_postdeactivate_hook;
typeset old_env;
virtualenvwrapper_run_hook "pre_deactivate";
env_postdeactivate_hook="$VIRTUAL_ENV/$VIRTUALENVWRAPPER_ENV_BIN_DIR/postdeactivate";
old_env=$(basename "$VIRTUAL_ENV");
virtualenv_deactivate $1;
virtualenvwrapper_run_hook "post_deactivate" "$old_env";
if [ ! "$1" = "nondestructive" ]; then
unset -f virtualenv_deactivate > /dev/null 2>&1;
unset -f deactivate > /dev/null 2>&1;
fi
}
I saw the function definition as well, but did not know how it related to the alias in the .csh file. Thanks a lot! Had no idea that you could define functions in this manner, as well as
type
out their definitions. – Parham – 2013-10-24T15:42:47.957