Skip to content

Commit

Permalink
Merge pull request rbenv#179 from johnwilliams/master
Browse files Browse the repository at this point in the history
rbenv-init arguments should be allowed in any order
  • Loading branch information
sstephenson committed Jan 17, 2012
2 parents 5d0a663 + f40bc77 commit 9ea1f7d
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions libexec/rbenv-init
Expand Up @@ -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
Expand Down

0 comments on commit 9ea1f7d

Please sign in to comment.