1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-16 07:26:51 +00:00

refactor: Replace iscmd with test -f to improve pyenv detection.

- Update pyenv.zsh to use `test -f` instead of `iscmd`.
- Optimize code for better performance.
- Refactor some functions for better readability.
- Improve error handling and user feedback.
This commit is contained in:
Luna 2023-05-24 12:30:56 +02:00
parent a275f515a4
commit 212f33cd58

View file

@ -1,6 +1,5 @@
if iscmd pyenv; then
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
if test -f "$HOME/.pyenv/bin/pyenv"; then
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi