diff --git a/bin/pyenv-virtualenvs b/bin/pyenv-virtualenvs index 7144030..09769f1 100755 --- a/bin/pyenv-virtualenvs +++ b/bin/pyenv-virtualenvs @@ -83,9 +83,8 @@ print_version() { else version_repr="$version" fi - if [[ ${BASH_VERSINFO[0]} -ge 4 && ${current_versions["$1"]} ]]; then - echo "${hit_prefix}${version_repr} (set by $(pyenv-version-origin))" - elif [[ ${BASH_VERSINFO[0]} -le 3 ]] && exists "$1" "${current_versions[@]}"; then + if [[ ${BASH_VERSINFO[0]} -gt 3 && ${current_versions["$1"]} ]] || \ + { [[ ${BASH_VERSINFO[0]} -le 3 ]] && exists "$1" "${current_versions[@]}"; }; then echo "${hit_prefix}${version_repr} (set by $(pyenv-version-origin))" else echo "${miss_prefix}${version_repr}"