mirror of https://github.com/jenv/jenv.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
534 B
27 lines
534 B
#!/usr/bin/env bash |
|
set -e |
|
[ -n "$JENV_DEBUG" ] && set -x |
|
|
|
JENV_VERSION_NAME="$(jenv-version-name)" |
|
|
|
if [ "$1" = "--bare" ]; then |
|
hit_prefix="" |
|
miss_prefix="" |
|
print_version="$JENV_VERSION_NAME" |
|
else |
|
hit_prefix="* " |
|
miss_prefix=" " |
|
print_version="$(jenv-version)" |
|
fi |
|
|
|
for path in "${JENV_ROOT}/versions/"*; do |
|
if [ -d "$path" ]; then |
|
version="${path##*/}" |
|
|
|
if [ "$version" == "$JENV_VERSION_NAME" ]; then |
|
echo "${hit_prefix}${print_version}" |
|
else |
|
echo "${miss_prefix}${version}" |
|
fi |
|
fi |
|
done
|
|
|