mirror of
https://github.com/rbenv/rbenv.git
synced 2024-12-29 13:15:42 +01:00
Allow init arguments to be in any order.
This commit is contained in:
parent
5d0a6630b9
commit
f40bc773d2
1 changed files with 12 additions and 9 deletions
|
@ -3,16 +3,19 @@ set -e
|
|||
[ -n "$RBENV_DEBUG" ] && set -x
|
||||
|
||||
print=""
|
||||
if [ "$1" = "-" ]; then
|
||||
print=1
|
||||
shift
|
||||
fi
|
||||
|
||||
no_rehash=""
|
||||
if [ "$1" = "--no-rehash" ]; then
|
||||
no_rehash=1
|
||||
shift
|
||||
fi
|
||||
for args in "$@"
|
||||
do
|
||||
if [ "$args" = "-" ]; then
|
||||
print=1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ "$args" = "--no-rehash" ]; then
|
||||
no_rehash=1
|
||||
shift
|
||||
fi
|
||||
done
|
||||
|
||||
shell="$1"
|
||||
if [ -z "$shell" ]; then
|
||||
|
|
Loading…
Reference in a new issue