mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Show usage if no arguments are passed to rbenv-plugin-scripts
This commit is contained in:
parent
2b5fb40b99
commit
0c7c62dc04
1 changed files with 7 additions and 1 deletions
|
@ -10,8 +10,14 @@ if [ "$1" = "--complete" ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
RBENV_COMMAND="$1"
|
||||
if [ -z "$RBENV_COMMAND" ]; then
|
||||
echo "usage: rbenv plugin-scripts COMMAND" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
shopt -s nullglob
|
||||
SCRIPTS=(/etc/rbenv.d/$1/*.bash ${RBENV_ROOT}/rbenv.d/$1/*.bash)
|
||||
SCRIPTS=(/etc/rbenv.d/"$RBENV_COMMAND"/*.bash ${RBENV_ROOT}/rbenv.d/"$RBENV_COMMAND"/*.bash)
|
||||
shopt -u nullglob
|
||||
|
||||
for script in ${SCRIPTS[@]}; do
|
||||
|
|
Loading…
Reference in a new issue