mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-29 13:15:42 +01:00
Extract rbenv-shims
This commit is contained in:
parent
69d596f56f
commit
61830048d5
2 changed files with 18 additions and 4 deletions
|
@ -4,10 +4,7 @@ set -e
|
|||
|
||||
# Provide rbenv completions
|
||||
if [ "$1" = "--complete" ]; then
|
||||
for command in "${RBENV_ROOT}/shims/"*; do
|
||||
echo "${command##*/}"
|
||||
done
|
||||
exit
|
||||
exec rbenv shims --short
|
||||
fi
|
||||
|
||||
RBENV_COMMAND="$1"
|
||||
|
|
17
libexec/rbenv-shims
Executable file
17
libexec/rbenv-shims
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
[ -n "$RBENV_DEBUG" ] && set -x
|
||||
|
||||
# Provide rbenv completions
|
||||
if [ "$1" = "--complete" ]; then
|
||||
echo --short
|
||||
exit
|
||||
fi
|
||||
|
||||
for command in "${RBENV_ROOT}/shims/"*; do
|
||||
if [ "$1" = "--short" ]; then
|
||||
echo "${command##*/}"
|
||||
else
|
||||
echo "$command"
|
||||
fi
|
||||
done | sort
|
Loading…
Reference in a new issue