virtualfish
virtualfish copied to clipboard
Make it possible to activate venvs outside VIRTUALFISH_HOME
#223 I took a stab at it. Let me know what you think. Hopefully this doesn't break anything :smile:
No worries, my branch has served my needs well, and I underdstand you're doing this basically for free, no need to apologize :)
Your suggestions seem pretty neat. If you're not in a hurry I'll try to take a stab at them in few days, as lately I've been more busy than usual.
Sorry for the delay. I incorporated your suggestions. The logic is encapsulated in the new function. Now it's possible to activate virtualenvs inside $VIRTUALFISH_HOME
, and in directiories pointed by absolute and relative paths, including those directly in $PWD
(no slashes required). To sum up, the following work, and do what one would expect:
vf activate ./venv
vf activate /home/projects/foo/.venv
vf activate .
vf activate ../venv/
One thing I'm slightly concerned about is activating a virtualenv in $PWD
as a security issue, but since $VIRTUALFISH_HOME
is checked before the $PWD
, I don't think this is a real problem.
If you have any further comments, I'll be happy to address them, with smaller latency this time I hope, haha.
I noticed that the feature doesn't play well with paths containing spaces. From what I understand, fixing that would require making some changes to the vf
function. I might look into that.