ENH make functions for activating environments
This commit is contained in:
parent
d390691484
commit
f31115efd8
|
@ -58,12 +58,31 @@ x11-clip-wrap-widgets paste $paste_widgets
|
||||||
# involve a) adding a "shims" directory to PATH and then b) adding some shell
|
# involve a) adding a "shims" directory to PATH and then b) adding some shell
|
||||||
# magic to automatically call the shims
|
# magic to automatically call the shims
|
||||||
|
|
||||||
if command -v pyenv 1>/dev/null 2>&1; then
|
zsh-pyenv () {
|
||||||
eval "$(pyenv init - | sed '/PATH/d' -)"
|
if command -v pyenv 1>/dev/null 2>&1; then
|
||||||
eval "$(pyenv virtualenv-init - | sed '/PATH/d' -)"
|
echo "Activating pyenv"
|
||||||
fi
|
eval "$(pyenv init - | sed '/PATH/d' -)"
|
||||||
|
eval "$(pyenv virtualenv-init - | sed '/PATH/d' -)"
|
||||||
|
else
|
||||||
|
echo "pyenv not installed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if command -v rbenv 1>/dev/null 2>&1; then
|
|
||||||
eval "$(rbenv init - | sed '/PATH/d' -)"
|
zsh-rbenv () {
|
||||||
fi
|
if command -v rbenv 1>/dev/null 2>&1; then
|
||||||
|
echo "Activating rbenv"
|
||||||
|
eval "$(rbenv init - | sed '/PATH/d' -)"
|
||||||
|
else
|
||||||
|
echo "rbenv not installed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
zsh-conda () {
|
||||||
|
if [[ -x $XDG_DATA_HOME/mambaforge/bin/conda ]]; then
|
||||||
|
eval "$($XDG_DATA_HOME/mambaforge/bin/conda shell.zsh hook)"
|
||||||
|
else
|
||||||
|
echo "conda installation not found"
|
||||||
|
fi
|
||||||
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in New Issue