Created
March 24, 2022 08:36
-
-
Save phdd/3c205cb2fb8fb4397ef44bece82c2968 to your computer and use it in GitHub Desktop.
ZSH Plugin for Lazy Loading Miniconda (Arch Linux) adopted from https://reddit.com/qmd25q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load_miniconda() { | |
unalias conda | |
__conda_setup="$('/opt/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "/opt/miniconda3/etc/profile.d/conda.sh" ]; then | |
. "/opt/miniconda3/etc/profile.d/conda.sh" | |
else | |
export PATH="/opt/miniconda3/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
unfunction load_miniconda | |
} | |
alias conda="load_miniconda && conda" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment