New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fish shell and activation scripts #7993
Comments
Maybe this could be a way? https://github.com/oh-my-fish/plugin-foreign-env |
I confirmed that an environment variable set in a .fish file in |
Considering that |
I find a workaround - it seems that *.fish files are executed but not properly "sourced". If you add a PS: I am on conda 4.5.11 |
as @zhubonan said, here is an example of what it should look like in the build.sh script: In this example we are taking the openjdk package and fixing it to provide the same variables as the bash activation scripts. The deactivate is not fully robust but this will make the picture for you
once that is done simply deactivate and reactivate your environment for the variables to work correctly. |
Hi there, thank you for your contribution to Conda! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue. In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again. Thanks! |
Would it be possible to reopen this? |
@jakirkham sure, it'd probably be good to also focus on a more agnostic solution #6820 |
I successfully made a workaround to run bash activation scripts. I used a separate bash script and fish script, utilizing the
#!/bin/bash
FILES=$CONDA_PREFIX/etc/conda/activate.d/*.sh;
for f in $FILES;
do
source $f;
_tc_activation "activate";
echo "Activated $f";
done
#!/usr/bin/env fish
conda activate DEV
bass source ./run_activation_scripts.sh To set up the environment (in this case hardcoded to |
While the fish shell is supported for standard conda operations, I'm wondering how should one go about activation scripts in
$CONDA_PREFIX/etc/conda/activate.d
.They are usually given in
/bin/sh
format like:which isn't supported by fish, at least my environment variables are not changed by having this activation script in my conda env.
Several things to check:
conda
at all looking for activation scripts at$CONDA_PREFIX/etc/conda/activate.d
?I'm just really looking for guide lines how to advance proper fish use with conda, not asking the anaconda team for doing any of this. If I can provide a PR on the conda-fish script, I will of course consider that, once I know how this should be addressed.
The text was updated successfully, but these errors were encountered: