diff --git a/bin/rbenv-install b/bin/rbenv-install index e4e35301..3d61f58e 100755 --- a/bin/rbenv-install +++ b/bin/rbenv-install @@ -2,27 +2,27 @@ # # Summary: Install a Ruby version using ruby-build # -# Usage: rbenv install [-f|-s] [-kpv] +# Usage: rbenv install [-f|-s] [-kpv] [-- ] # rbenv install [-f|-s] [-kpv] -# rbenv install -l|--list +# rbenv install --list # rbenv install --version # -# -l/--list List latest stable versions for each Ruby -# -L/--list-all List all local versions -# -f/--force Install even if the version appears to be installed already -# -s/--skip-existing Skip if the version appears to be installed already +# -l, --list List latest stable versions for each Ruby +# -L, --list-all List all local versions, including outdated ones +# -f, --force Allow overwriting an existing installed version +# -s, --skip-existing Avoid overwriting an existing installed version # # ruby-build options: # -# -k/--keep Keep source tree in $RBENV_BUILD_ROOT after installation -# (defaults to $RBENV_ROOT/sources) -# -p/--patch Apply a patch from stdin before building -# -v/--verbose Verbose mode: print compilation status to stdout -# --version Show version of ruby-build +# -v, --verbose Verbose mode: forward all build output to stdout/stderr +# -p, --patch Apply a patch from stdin before building +# -k, --keep Keep source tree in RBENV_BUILD_ROOT after installation +# (defaults to "RBENV_ROOT/sources") +# --version Show version of ruby-build # -# For detailed information on installing Ruby versions with -# ruby-build, including a list of environment variables for adjusting -# compilation, see: https://github.com/rbenv/ruby-build#usage +# For detailed information on installing Ruby versions with ruby-build, +# including a list of environment variables for adjusting compilation, +# see: https://github.com/rbenv/ruby-build#usage # set -e [ -n "$RBENV_DEBUG" ] && set -x @@ -100,7 +100,7 @@ for option in "${OPTIONS[@]}"; do [ ! -t 1 ] || { echo echo "Only latest stable releases for each Ruby implementation are shown." - echo "Use 'rbenv install --list-all / -L' to show all local versions." + echo "Use \`rbenv install --list-all' to show all local versions." } 1>&2 exit ;; @@ -239,7 +239,7 @@ if [ "$STATUS" == "2" ]; then echo "$candidates" | indent fi echo - echo "See all available versions with \`rbenv install --list'." + echo "See all available versions with \`rbenv install --list-all'." echo echo -n "If the version you need is missing, try upgrading ruby-build" if [ "$here" != "${here#"$(brew --prefix 2>/dev/null)"}" ]; then @@ -247,7 +247,7 @@ if [ "$STATUS" == "2" ]; then echo " brew upgrade ruby-build" elif [ -d "${here}/.git" ]; then printf ":\n\n" - echo " git -C ${here} pull" + echo " git -C ${here/${HOME}\//~/} pull" else printf ".\n" fi diff --git a/bin/ruby-build b/bin/ruby-build index 176ace3c..e02f3cd5 100755 --- a/bin/ruby-build +++ b/bin/ruby-build @@ -1,17 +1,18 @@ #!/usr/bin/env bash # -# Usage: ruby-build [-kpv] -# ruby-build --definitions +# Usage: ruby-build [-kpv] [-- ] +# ruby-build {--list|--definitions} # ruby-build --version # -# -k/--keep Do not remove source tree after installation -# -p/--patch Apply a patch from stdin before building -# -v/--verbose Verbose mode: print compilation status to stdout -# -4/--ipv4 Resolve names to IPv4 addresses only -# -6/--ipv6 Resolve names to IPv6 addresses only -# --definitions List all local definitions -# -l/--list List latest stable releases for each Ruby -# --version Show version of ruby-build +# -l, --list List latest stable releases for each Ruby +# --definitions List all local definitions, including outdated ones +# --version Show version of ruby-build +# +# -v, --verbose Verbose mode: forward all build output to stdout/stderr +# -p, --patch Apply a patch from stdin before building +# -k, --keep Do not remove source tree after installation +# -4, --ipv4 Resolve names to IPv4 addresses only +# -6, --ipv6 Resolve names to IPv6 addresses only # RUBY_BUILD_VERSION="20231025" diff --git a/test/rbenv.bats b/test/rbenv.bats index b7727bdb..4496b1fe 100644 --- a/test/rbenv.bats +++ b/test/rbenv.bats @@ -101,11 +101,11 @@ The following versions contain \`1.9.3' in the name: 1.9.3-p0 1.9.3-p194 -See all available versions with \`rbenv install --list'. +See all available versions with \`rbenv install --list-all'. If the version you need is missing, try upgrading ruby-build: - git -C ${BATS_TEST_DIRNAME}/.. pull + git -C ${BATS_TEST_DIRNAME/$HOME\//~/}/.. pull OUT unstub brew @@ -122,7 +122,7 @@ OUT assert_output <