Using xonsh as my shell and conda environments, I hit an error within the VSCode terminal when it attempts to activate an environment.
This is because VSCode issues the source activate environment
command whenever the selected interpreter is a conda environment. That's correctly following the instructions from Anaconda and is discussed on https://github.com/Microsoft/vscode-python/issues/383
However, the Xonsh shell does things differently. It doesn't include a source
command and instead has a plugin for managing conda environments (https://github.com/gforsyth/xonda). Within Xonsh, the correct command is conda activate environment
For the moment, I've created an alias for source
as a workaround, but is there a better way? e.g. Is there some way to customise the command that's issued by VSCode?