chore: rewrite conda setup to run on Intel and Silicon Macs

This commit is contained in:
Stefan Imhoff
2023-04-17 13:13:50 +02:00
parent 868b1d0b06
commit 3e2adeab65
2 changed files with 7 additions and 18 deletions

View File

@@ -51,12 +51,11 @@ set --export FZF_TMUX_OPTS -p
set --export FZF_ALT_C_COMMAND "fd --type d $FD_OPTIONS --color=never --hidden"
set --export FZF_ALT_C_OPTS "--preview 'tree -C {} | head -50'"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
if test -f /opt/homebrew/Caskroom/miniconda/base/bin/conda
eval /opt/homebrew/Caskroom/miniconda/base/bin/conda "shell.fish" hook $argv | source
# Conda
set conda_path (brew --prefix)/Caskroom/miniconda/base/bin/conda
if test -f $conda_path
eval $conda_path "shell.fish" hook $argv | source
end
# <<< conda initialize <<<
# Zoxide
zoxide init fish | source

View File

@@ -60,20 +60,10 @@ eval "$(zoxide init zsh)"
export PATH="/Library/TeX/texbin:$PATH"
# Conda
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/usr/local/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/local/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
. "/usr/local/Caskroom/miniconda/base/etc/profile.d/conda.sh"
else
export PATH="/usr/local/Caskroom/miniconda/base/bin:$PATH"
fi
conda_path=$(brew --prefix)/Caskroom/miniconda/base/bin/conda
if [ -f "$conda_path" ]; then
eval "$("$conda_path" shell.zsh hook $argv)" | source
fi
unset __conda_setup
# <<< conda initialize <<<
# Man
export MANPATH="/usr/local/man:$MANPATH"