mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
A few tweaks to the help text
This commit is contained in:
parent
f2f8ef88a5
commit
5394347500
1 changed files with 26 additions and 15 deletions
|
@ -1,13 +1,18 @@
|
||||||
#!/usr/bin/env bash -e
|
#!/usr/bin/env bash -e
|
||||||
|
|
||||||
print_set_version() {
|
print_set_version() {
|
||||||
echo "<version> should be a string matching the installed Ruby name known by rbenv.
|
echo "<version> should be a string matching a Ruby version known by rbenv."
|
||||||
|
|
||||||
For your install, this is currently one of:
|
local versions="$(rbenv-versions --bare)"
|
||||||
|
if [ -z "$versions" ]; then
|
||||||
|
echo "There are currently no Ruby versions installed for rbenv."
|
||||||
|
else
|
||||||
|
echo "The currently installed Ruby versions are:"
|
||||||
|
echo "$versions" | sed 's/^/ /'
|
||||||
|
fi
|
||||||
|
|
||||||
$(rbenv-versions --bare)
|
echo
|
||||||
|
echo "The special version string 'system' will use your default system Ruby."
|
||||||
The special version string 'system' will use your default system Ruby."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -15,27 +20,33 @@ case "$1" in
|
||||||
|
|
||||||
Some useful rbenv commands are:
|
Some useful rbenv commands are:
|
||||||
commands List all commands
|
commands List all commands
|
||||||
rehash Rehash rbenv shims, use after installing binaries
|
rehash Rehash rbenv shims (run this after installing binaries)
|
||||||
set-default Set global default Ruby
|
set-default Set the default Ruby version
|
||||||
set-local Set local directory default Ruby
|
set-local Set a local directory-specific Ruby version
|
||||||
version Show Ruby version being used
|
version Show the current Ruby version
|
||||||
versions List Ruby versions known by rbenv
|
versions List all Ruby versions known by rbenv
|
||||||
|
|
||||||
See 'rbenv help <command>' for more information on a specific command.
|
See 'rbenv help <command>' for more information on a specific command.
|
||||||
For a quick guide to rbenv, see: https://gist.github.com/1120938"
|
For a quick guide to rbenv, see: https://gist.github.com/1120938"
|
||||||
;;
|
;;
|
||||||
set-default) echo "usage: rbenv set-default <version>
|
set-default) echo "usage: rbenv set-default <version>
|
||||||
|
|
||||||
Sets the global default Ruby.
|
Sets the default Ruby version. You can override the default at any time
|
||||||
|
by setting a directory-specific version with \`rbenv set-default' or by
|
||||||
|
setting the RBENV_VERSION environment variable.
|
||||||
|
|
||||||
$(print_set_version)"
|
$(print_set_version)"
|
||||||
;;
|
;;
|
||||||
set-local) echo "usage: rbenv set-local <version>
|
set-local) echo "usage: rbenv set-local <version>
|
||||||
|
|
||||||
Sets the local directory default Ruby, by writing the version to a file
|
Sets the local directory-specific Ruby version by writing the version
|
||||||
named '.rbenv-version'. rbenv will search for this file up the directory
|
name to a file named '.rbenv-version'.
|
||||||
tree from the current working directory each time its shims are executed,
|
|
||||||
so this default will affect subdirectories.
|
When you run a Ruby command, rbenv will look for an '.rbenv-version'
|
||||||
|
file in the current directory and each parent directory. If no such
|
||||||
|
file is found in the tree, rbenv will use the default Ruby version
|
||||||
|
specified with \`rbenv set-default', or the version specified in the
|
||||||
|
RBENV_VERSION environment variable.
|
||||||
|
|
||||||
$(print_set_version)"
|
$(print_set_version)"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue