Skip to content

Commit

Permalink
pyenv
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien COSMAO committed May 29, 2024
1 parent bc1c58b commit 20e8605
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/blocks/pyenv.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ BLOX_BLOCK__PYENV_SYMBOL="${BLOX_BLOCK__PYENV_SYMBOL:-󰌠}"
# Helper functions

function blox_block__pyenv_helper__get_version() {
pyenv_version=${PYENV_VERSION:-$(cat $PYENV_ROOT/version 2> /dev/null)}
[[ $pyenv_version = system ]] && unset pyenv_version
python_version=$( (python3 -V || python -V) 2> /dev/null | awk '{print $2}')
if [[ $pyenv_version = $python_version ]]; then
pyenv_version="pyenv"
fi
[[ -n $pyenv_version ]] && pyenv_version+=':'
echo -n "${pyenv_version}${python_version}"
echo -n "${python_version}"
}

function blox_pyenv__has_python_known_files() {
Expand Down

0 comments on commit 20e8605

Please sign in to comment.