This provides conda activate and deactivate scripts for xonsh. Please let me know if there is anything else that needs to be done here. If you would like to test these locally, these require the improvements in xonsh/xonsh#2072
initial xonsh activate.xsh
added initial xonsh deactivate
Merge branch 'master' into xonsh-activate
some small fixes for fuzzy matching
hm fascinating, there's never too many shells ;)
my only 2 cents:
since xonsh is an exotic shell spawning from python we should be able to do some nifty tricks to get the activate/deactivate scripts to properly recognize xonsh or otherwise bourne-shells vs c-shells:
# bourne- and c- shell detection code that sources the appropriate scripts
# xonsh detection code that sources the xonsh scripts
if the above is possible then it may make sense to rethink the xonsh code a little to make it parallel the code for bourne- and c- shells in order to decrease longterm code maintenance costs
otherwise if xonsh detection cannot be bundled into activate/deactivate then it would make more sense to make it match the design of the fish support (especially since xonsh supports methods)
also it would be ideal to include the $CONDA_INSTALL_PREFIX from #3959
Thanks for the feedback @njalerikson. I think that rewriting activate/deactivate to be both sh- and xonsh-compatible might be too fragile. This is especially true because of the she-bang line, even though it says to ignore it.
I think the right approach is more fish-like. xonsh has an plugins system and so there is natural place for an extension like this to be installed to. I'll try to refactor in the next day or so.
refactored to conda.xsh, like fish
install hooks for xontrib
Ok I have updated this to be more like the fish implementation! I don't think that the $CONDA_INSTALL_PREFIX is really needed here since we no longer rely on sourcing de/activate scripts. xonsh will find the hooks in the usual xontrib location without going through the PATH
Any pointers here @njalerikson? The errors seem totally unrelated to anything I added. I have been over it a few times and checked for syntax errors and there don't seem to be any.
Hey, going to try circling back here soon. 4.3 is about to drop in defaults at any point, and then I'll have some time. There are a lot of failing tests in master right now. Test failures here might not be your fault.
Ahh OK, thanks!
Not an error item but I do see that you have attempted to install the xonsh scripts via the setup.py file.
This is no longer the conda way. conda installs itself using the recipe defined in conda.recipe. The setup.py file exists only to allow the conda library to be installed via pip.
I must admit though that I have not been able to keep up with all of the changes made in the last month regarding the recipe and how conda is installed. Probably the best way to see where things may need to go is to search for references to conda.fish and compare that with references to activate.csh.
Updated xontrib install to conda.recipe
Thanks for the hint @njalerikson. I have updated the PR to reflect this.