Преглед на файлове

Implement some basic command line help

pull/360/head^2
Ryan Baumann преди 13 години
родител
ревизия
f2f8ef88a5
променени са 2 файла, в които са добавени 44 реда и са изтрити 1 реда
  1. +1
    -1
      libexec/rbenv
  2. +43
    -0
      libexec/rbenv-help

+ 1
- 1
libexec/rbenv Целия файл

@ -19,7 +19,7 @@ export PATH="${libexec_path}:${PATH}"
command="$1"
if [ -z "$command" ]; then
echo "rbenv 0.1.0" >&2
echo -e "rbenv 0.1.0\n$(rbenv-help)" >&2
else
command_path="$(command -v "rbenv-$command" || true)"

+ 43
- 0
libexec/rbenv-help Целия файл

@ -0,0 +1,43 @@
#!/usr/bin/env bash -e
print_set_version() {
echo "<version> should be a string matching the installed Ruby name known by rbenv.
For your install, this is currently one of:
$(rbenv-versions --bare)
The special version string 'system' will use your default system Ruby."
}
case "$1" in
"") echo "usage: rbenv <command> [<args>]
Some useful rbenv commands are:
commands List all commands
rehash Rehash rbenv shims, use after installing binaries
set-default Set global default Ruby
set-local Set local directory default Ruby
version Show Ruby version being used
versions List Ruby versions known by rbenv
See 'rbenv help <command>' for more information on a specific command.
For a quick guide to rbenv, see: https://gist.github.com/1120938"
;;
set-default) echo "usage: rbenv set-default <version>
Sets the global default Ruby.
$(print_set_version)"
;;
set-local) echo "usage: rbenv set-local <version>
Sets the local directory default Ruby, by writing the version to a file
named '.rbenv-version'. rbenv will search for this file up the directory
tree from the current working directory each time its shims are executed,
so this default will affect subdirectories.
$(print_set_version)"
;;
*) echo "No command arguments needed or invalid/undocumented command."
esac

Зареждане…
Отказ
Запис