update: generalize the command to actvate conda and load config if file exists

This commit is contained in:
juancwu 2022-12-15 23:04:57 -05:00
commit 54c549f764
No known key found for this signature in database

View file

@ -2,7 +2,7 @@ set fish_greeting ""
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
status is-interactive && eval /home/jc/miniconda3/bin/conda "shell.fish" "hook" $argv | source
status is-interactive && eval $HOME/miniconda3/bin/conda "shell.fish" "hook" $argv | source
# <<< conda initialize <<<
# Go
@ -14,9 +14,15 @@ fish_add_path $GOPATH/bin
# load configuration files based on OS
switch (uname)
case Darwin
source (dirname (status --current-file))/config-darwin.fish
set DARWIN_CONFIG (dirname (status --current-file))/config-darwin.fish
if test -f $DARWIN_CONFIG
source $DARWIN_CONFIG
end
case Linux
source (dirname (status --current-file))/config-linux.fish
set LINUX_CONFIG (dirname (status --current-file))/config-linux.fish
if test -f $LINUX_CONFIG
source $LINUX_CONFIG
end
end
if type -q exa