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
|
||||||
|
|
||||||
|
zsh-pyenv () {
|
||||||
if command -v pyenv 1>/dev/null 2>&1; then
|
if command -v pyenv 1>/dev/null 2>&1; then
|
||||||
|
echo "Activating pyenv"
|
||||||
eval "$(pyenv init - | sed '/PATH/d' -)"
|
eval "$(pyenv init - | sed '/PATH/d' -)"
|
||||||
eval "$(pyenv virtualenv-init - | sed '/PATH/d' -)"
|
eval "$(pyenv virtualenv-init - | sed '/PATH/d' -)"
|
||||||
|
else
|
||||||
|
echo "pyenv not installed"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
zsh-rbenv () {
|
||||||
if command -v rbenv 1>/dev/null 2>&1; then
|
if command -v rbenv 1>/dev/null 2>&1; then
|
||||||
|
echo "Activating rbenv"
|
||||||
eval "$(rbenv init - | sed '/PATH/d' -)"
|
eval "$(rbenv init - | sed '/PATH/d' -)"
|
||||||
|
else
|
||||||
|
echo "rbenv not installed"
|
||||||
fi
|
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