mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
23 lines
424 B
Bash
Executable file
23 lines
424 B
Bash
Executable file
#!/usr/bin/env bash -e
|
|
|
|
RBENV_VERSION="$(rbenv-version 2>/dev/null || true)"
|
|
|
|
hit_prefix="* "
|
|
miss_prefix=" "
|
|
|
|
if [ "$1" = "--bare" ]; then
|
|
hit_prefix=""
|
|
miss_prefix=""
|
|
fi
|
|
|
|
for path in "${HOME}/.rbenv/versions/"*; do
|
|
if [ -d "$path" ]; then
|
|
version="${path##*/}"
|
|
|
|
if [ "$version" == "$RBENV_VERSION" ]; then
|
|
echo "${hit_prefix}${version}"
|
|
else
|
|
echo "${miss_prefix}${version}"
|
|
fi
|
|
fi
|
|
done
|