Marco Hinz
af53c790cc
Better error message for `rbenv shell`
Shell integration is not enabled by default. This means that, from all the
commands from `rbenv commands`, only "shell" won't work right away.
Replace "no such command" with a more descriptive message that points to
`rbenv init` instead.
pirms 9 gadiem
Daniel Hahler
5f8a4c4d62
Fix some issues reported by shellcheck
pirms 9 gadiem
Mislav Marohnić
b80ea43e25
Quote directory name in variable assignment
pirms 8 gadiem
Tim Pope
9d93605e18
Don't unset CDPATH
pirms 9 gadiem
Tim Pope
1f1e291385
Enforce absolute RBENV_DIR
This prevents CDPATH from becoming an issue.
Closes #866 .
pirms 9 gadiem
Yamashita, Yuu
26ac59fd1d
Write help message to stdout
pirms 10 gadiem
Yamashita, Yuu
7860ad5268
Help message should not be written to stdout for `sh-` commands ( yyuu/pyenv#650 )
pirms 10 gadiem
Mike Busch
d246e20764
unset CDPATH if it's set by the user
pirms 10 gadiem
Mislav Marohnić
e554cd86c3
Strip leading `:` from RBENV_HOOK_PATH
pirms 10 gadiem
Jason Karns
a1ef9efc80
use PWD var over pwd command
pirms 10 gadiem
Jason Karns
87dd5fe2c0
indentation
pirms 10 gadiem
Jason Karns
3ddedc021a
Extract `abort` helper function
fail helper prints message to stderr and exits 1
(prefixes 'rbenv: ' if given a string arg)
pirms 10 gadiem
Jason Karns
2c4dd63f77
handle --help for subcommands
If subcommand is provided (and exists) and its first arg is -h/--help,
go ahead and intercept the call; redirecting to rbenv-help <subcommand>
This means subcommands and plugins need not handle --help flag
themselves
pirms 10 gadiem
Jason Karns
06e4f1b682
explicit --version flag
Without it, it falls back to `--version` being executed as a subcommand,
which works but isn't obvious
pirms 10 gadiem
Mislav Marohnić
825de5d2e3
Fix argument handling in main `rbenv` command
- Explicitly asking for help with `-h` or `--help` exits with 0 status
and displays help on stdout.
- Not providing any arguments to rbenv results in failure status and
displays version and help on stderr.
pirms 10 gadiem
Mislav Marohnić
6e02b944f7
Use `$BASH_SOURCE` instead of `$0`
BASH_SOURCE might be more reliable.
pirms 10 gadiem
Mislav Marohnić
632263568e
Add rbenv's own `rbenv.d` directory to hook paths
This allows rbenv source code to ship with built-in hooks.
pirms 11 gadiem
Mislav Marohnić
3f74da0e73
Fail hard if RBENV_NATIVE_EXT is set but extensions failed to load
pirms 12 gadiem
Mislav Marohnić
5287e2ebf4
Avoid slow `abs_dirname()` by loading `realpath` extension
This speeds up every `rbenv` invocation significantly.
pirms 12 gadiem
James FitzGibbon
81bb14e181
bail out early if readlink is not available
readlink comes from GNU coreutils. On systems without it, rbenv used to
spin out of control when it didn't have readlink or greadlink available
because it would re-exec the frontend script over and over instead of the
worker script in libexec.
Fixes #389
pirms 13 gadiem
Sam Stephenson
e3f72ebae2
Guard against exported `CDPATH` ( fixes #316 )
pirms 13 gadiem
Sam Stephenson
3cb95b4d2d
Add `rbenv --debug <command>` as a shortcut for setting RBENV_DEBUG=1
pirms 13 gadiem
Sam Stephenson
892aea138e
Export PS4 when RBENV_DEBUG is set for more informative debug output
pirms 13 gadiem
Sam Stephenson
1ebcbd92e2
Tweak `rbenv --version` output
pirms 13 gadiem
Mislav Marohnić
b5a26936e8
rbenv --version
pirms 13 gadiem
Antonio Terceiro
d1bfeee334
Add /usr/lib/rbenv/hooks to hook search path
This will help with the packaging of rbenv plugin that contain hooks in
Debian.
pirms 14 gadiem
Sam Stephenson
b10bdb1e78
rbenv 0.3.0
pirms 14 gadiem
Sam Stephenson
7fbcde8af0
Properly expand RBENV_DIR and ensure it exists
pirms 14 gadiem
Per Velschow
dfc7645609
Quoting the argument to greadlink to make it work with paths containing spaces.
pirms 14 gadiem
Sam Stephenson
01a0ad0b69
rbenv 0.2.1
pirms 15 gadiem
Sam Stephenson
e49be969ab
Ensure RBENV_DIR is always an absolute path
Otherwise, `RBENV_DIR=bin rbenv version-file` loops indefinitely
pirms 15 gadiem
Sam Stephenson
2cd12e3fa6
rbenv 0.2.0
pirms 15 gadiem
Sam Stephenson
07815769ae
RBENV_DIR sets the directory from which .rbenv-version files are scanned
pirms 15 gadiem
Sam Stephenson
10084ae020
Automatically add ${RBENV_ROOT}/plugins/*/etc/rbenv.d to $RBENV_HOOK_PATH
pirms 15 gadiem
Sam Stephenson
8ce5e84c21
Automatically add ${RBENV_ROOT}/plugins/*/bin to $PATH
pirms 15 gadiem
Sam Stephenson
f9fb3c934e
rbenv-plugin-scripts -> rbenv-hooks; RBENV_PLUGIN_PATH -> RBENV_HOOK_PATH
pirms 15 gadiem
Joshua Peek
a238099e38
Include /usr/local/etc hooks
pirms 15 gadiem
Sam Stephenson
096743acde
Add support for RBENV_PLUGIN_PATH environment variable
pirms 15 gadiem
Sam Stephenson
568cd4b23e
Strip trailing slashes from RBENV_ROOT ( #83 )
pirms 15 gadiem
Sam Stephenson
0632325a43
Set RBENV_DEBUG=1 to see what's going on under the hood
pirms 15 gadiem
Sam Stephenson
2e3e141d2e
RBENV_ROOT defaults to ~/.rbenv
pirms 15 gadiem
Sam Stephenson
7ac964353f
RBENV_HOME -> RBENV_ROOT
pirms 15 gadiem
Alexander Rinass
5130f0464a
Support install locations other than $HOME/.rbenv.
Define RBENV_HOME env variable in libexec/rbenv and let all script delegates use this variable to determine rbenv's install location.
pirms 15 gadiem
Sam Stephenson
7bbfecd9af
Working on 0.2.0-pre now
pirms 15 gadiem
Paul Mucur
b7e19b4953
Solaris doesn't support readlink so use greadlink if available instead.
Taken from Ryan Tomayko's "GNU is killing Solaris", c.f. http://tomayko.com/writings/gnu-is-killing-solaris
pirms 15 gadiem
Sam Stephenson
49ecbe147f
rbenv 0.1.2
pirms 15 gadiem
Sam Stephenson
bd1e56ff37
rbenv 0.1.1
pirms 15 gadiem
Samuel Cochran
a14095f299
Add "-h" and "--help" which work as expected
pirms 15 gadiem
Andreas Johansson
6938692ca2
Fix argument that cannot be sent to bash via env
/usr/bin/env seems to have problems with arguments to bash on some
platforms. To bypass this, use set -e instead.
pirms 15 gadiem
Ryan Baumann
f2f8ef88a5
Implement some basic command line help
pirms 15 gadiem