rbenv/libexec/rbenv-shims

23 lines
380 B
Text
Raw Permalink Normal View History

2011-09-13 19:55:19 +02:00
#!/usr/bin/env bash
# Summary: List existing rbenv shims
# Usage: rbenv shims [--short]
2011-09-13 19:55:19 +02:00
set -e
[ -n "$RBENV_DEBUG" ] && set -x
# Provide rbenv completions
if [ "$1" = "--complete" ]; then
echo --short
exit
fi
2013-03-07 21:05:49 +01:00
shopt -s nullglob
2011-09-13 19:55:19 +02:00
for command in "${RBENV_ROOT}/shims/"*; do
if [ "$1" = "--short" ]; then
echo "${command##*/}"
else
echo "$command"
fi
done | sort