mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-14 14:23:53 -05:00
Add --bare option to rbenv-versions
This commit is contained in:
@@ -2,14 +2,22 @@
|
||||
|
||||
RBENV_VERSION="$(rbenv-version)"
|
||||
|
||||
for path in ~/.rbenv/versions/*; do
|
||||
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 "* $version"
|
||||
echo "${hit_prefix}${version}"
|
||||
else
|
||||
echo " $version"
|
||||
echo "${miss_prefix}${version}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user