Open Evpok opened 3 years ago
Hi @Evpok. Environments shouldn't be automatically activated via cd
if automatic activation is disabled. I don't have time to parse and understand what you mean, so it's important when filing issues to be really specific and unequivocally clear. With that in mind, can you elaborate?
Hi @justinmayer, let me try to reformulate: I wish to have links between directories and environments without using automatic activation, which is currently not supported. The behaviour I am looking for is for vf activate
to look for a .venv
(or whatever vf connect
creates) file in the current directory, and if there is one, to activate the corresponding environment.
So, to summarize, you want to save a few keystrokes by typing vf activate
instead of vf activate (cat .venv)
. Do I have that right?
More like vf activate (cat $VIRTUALFISH_ACTIVATION_FILE)
but yes, that's the idea.
My suggestion would be to define an abbreviation, replacing vfa
with your desired short-cut/macro:
abbr -a vfa vf activate (cat $VIRTUALFISH_ACTIVATION_FILE)
That way you get what you want in three keystrokes.
But if you want to submit a pull request that activates the relevant virtual environment when vf activate
is invoked with no arguments and a $VIRTUALFISH_ACTIVATION_FILE
is present in the current working directory, I can't think of any obvious impediments to merging it.
Thoughts?
Right, I'll do both: start with the abbreviation and see if I can get a PR to work. Thanks!
Feature Request
I really like the idea of linking directories to envs, but at the same time I don't always want to activate the linked env when I
cd
into a dir. It would be nice if there was way to manually activate the environment linked to byvf connect
even withauto_activation
disabled. This could take the form of a dedicated command, or just the behaviour ofvf activate
without specifying an env (look intoVIRTUALFISH_ACTIVATION_FILE
and activate the env you find there`.