Commit b9474ae1 authored by Sam Stephenson's avatar Sam Stephenson
Browse files

Add summary lines for `rbenv install` and `rbenv uninstall`

parent 9e49bc56
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
#!/usr/bin/env bash
#
# Summary: Install a Ruby version using the ruby-build plugin
#
# Usage: rbenv install [-k|--keep] [-v|--verbose] <version>
#        rbenv install [-k|--keep] [-v|--verbose] /path/to/definition
#        rbenv install -l|--list
@@ -26,7 +28,7 @@ eval "$(ruby-build --lib)"

usage() {
  # We can remove the sed fallback once rbenv 0.4.0 is widely available.
  rbenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,2d;p' < "$0"
  rbenv-help install 2>/dev/null || sed -ne '/^#/!q;s/.//;s/.//;1,4d;p' < "$0"
  [ -z "$1" ] || exit "$1"
}

+3 −1
Original line number Diff line number Diff line
#!/usr/bin/env bash
#
# Summary: Uninstall a specific Ruby version
#
# Usage: rbenv uninstall [-f] <version>
#
#    -f  Attempt to remove the specified version without prompting
@@ -30,7 +32,7 @@ case "$DEFINITION" in
"" | -* )
  # We can remove the sed fallback once rbenv 0.4.0 is widely available.
  { rbenv-help uninstall 2>/dev/null ||
    sed -ne '/^#/!q;s/.\{1,2\}//;1,2d;p' < "$0"
    sed -ne '/^#/!q;s/.\{1,2\}//;1,4d;p' < "$0"
  } >&2
  exit 1
  ;;