3
[ -n "$RBENV_DEBUG" ] && set -x
6
echo "<version> should be a string matching a Ruby version known by rbenv."
8
local versions="$(rbenv-versions --bare)"
9
if [ -z "$versions" ]; then
10
echo "There are currently no Ruby versions installed for rbenv."
12
echo "The currently installed Ruby versions are:"
13
echo "$versions" | sed 's/^/ /'
17
echo "The special version string 'system' will use your default system Ruby."
21
"") echo "usage: rbenv <command> [<args>]
23
Some useful rbenv commands are:
24
commands List all commands
25
rehash Rehash rbenv shims (run this after installing binaries)
26
global Set or show the global Ruby version
27
local Set or show the local directory-specific Ruby version
28
version Show the current Ruby version
29
versions List all Ruby versions known by rbenv
31
See 'rbenv help <command>' for more information on a specific command.
32
For more information, see: https://github.com/sstephenson/rbenv#readme"
34
global) echo "usage: rbenv global <version>
36
Sets the global Ruby version. You can override the global version at
37
any time by setting a directory-specific version with \`rbenv local'
38
or by setting the RBENV_VERSION environment variable.
42
local) echo "usage: rbenv local <version>
44
Sets the local directory-specific Ruby version by writing the version
45
name to a file named '.rbenv-version'.
47
When you run a Ruby command, rbenv will look for an '.rbenv-version'
48
file in the current directory and each parent directory. If no such
49
file is found in the tree, rbenv will use the global Ruby version
50
specified with \`rbenv global', or the version specified in the
51
RBENV_VERSION environment variable.
55
*) echo "No command arguments needed or invalid/undocumented command."