adambrenecki/virtualfish — pull request #31 by cro (2014-04-30 16:29:31+00:00)
Title: Add ability to look for and source a vfhooks.fish file as part of virtualenv activate

The current method of handling virtualenvwrapper's pre and post hooks in fish by using events is very elegant. However, unless there is something I don't understand, there isn't a way to keep hooks with a virtualenv because 1) the "all" events don't pass on information as to which virtualenv is being activated, and 2) fish cannot know the location of files to source with those event function at the time the venv is being activated.

This very small patch causes `vf activate` to look in $VIRTUAL_ENV/bin for a file called 'vfhooks.fish' and source it if it is present. This file can contain anything, but most likely it will contain `--on-event` functions to match events for the the env's activate/deactivate processes.