mirror of
https://github.com/MillironX/dotfiles.git
synced 2024-12-03 09:49:55 +00:00
refactor: Move conda hooks to .hooks
This commit is contained in:
parent
433c576a44
commit
c416a5304b
3 changed files with 15 additions and 31 deletions
|
@ -1,3 +1,18 @@
|
|||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $0) 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
if [ -f $HOME/.ion/bin/ion ]; then
|
||||
export PATH="$HOME/.ion/bin/ion:$PATH"
|
||||
export FPATH="$HOME/.ion/completions:$FPATH"
|
||||
|
|
|
@ -11,22 +11,6 @@ source $HOME/.hooks
|
|||
# User specific aliases and functions
|
||||
source $HOME/.aliases
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
conda config --set changeps1 true
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# >>> direnv initalize >>>
|
||||
if [ $(command -v direnv) ]; then
|
||||
eval "$(direnv hook bash)"
|
||||
|
|
|
@ -54,21 +54,6 @@ COMPLETION_WAITING_DOTS="true"
|
|||
|
||||
source $HOME/.hooks
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/miniconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/miniconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
# >>> direnv initalize >>>
|
||||
if [ $(command -v direnv) ]; then
|
||||
eval "$(direnv hook zsh)"
|
||||
|
|
Loading…
Reference in a new issue