Mislav Marohnić
e851250da6
Speed up obtaining `exec/which/whence` completions
Delegate to `rbenv-shims` instead of `rbenv shims` and therefore skip
going through the main `rbenv` executable again that would set up a lot
of the environment that was already set.
před 11 roky
Mislav Marohnić
3ee395f9b5
Clean up PATH sanitization in rbenv-which
před 11 roky
Daniel Hahler
e4cbf04592
Improve performance of rbenv-which when RBENV_VERSION=system
This implements removing of the shims path element via bash
substitution, instead of jumping around in all the `$PATH` elements.
před 12 roky
Mislav Marohnić
6bb7f07d2d
Avoid `rbenv-exec` calling out to `rbenv-version-name` twice
Running any shim (and thus `rbenv-exec`) would always execute
`rbenv-version-name` twice: once in `rbenv-exec` and another time in
`rbenv-which`, even though RBENV_VERSION variable would have already
been populated at this point.
Now RBENV_VERSION is respected within `rbenv-which`.
před 11 roky
Ian Yang
6ca591ab75
restore original IFS for hooks
před 13 roky
Mislav Marohnić
baf7656d2f
fix iterating through paths that have spaces in them
Fixes #344 , #196
před 13 roky
Sam Stephenson
e56885f4c9
"binary" -> "executable"
před 13 roky
Mislav Marohnić
3436bddaea
new-style documentation for most commands
před 13 roky
Sam Stephenson
e2e474c59d
Add `rbenv help --usage`
před 13 roky
Sam Stephenson
4c19dc22d7
Improve syntax for inline documentation and allow for multi-line usage
před 13 roky
Mislav Marohnić
b8715bfee6
foundation for a help system where each command holds its own docs
Docs are comprised from "Usage", "Summary" and "Help" sections, where
"Help" can span multiple commented lines. If it is missing, "Summary" is
shown in its place.
References #204 , references #206
před 13 roky
Roy Liu
99551dd1ec
fix rbenv-which with system ruby
Don't have `command -v` abort the whole script prematurely.
před 14 roky
Sam Stephenson
5d0a6630b9
Account for path entries with spaces in remove_from_path
před 14 roky
Sam Stephenson
f9fb3c934e
rbenv-plugin-scripts -> rbenv-hooks; RBENV_PLUGIN_PATH -> RBENV_HOOK_PATH
před 15 roky
Sam Stephenson
699cd8c203
Quote script path and remove unnecessary semicolon
před 15 roky
Joshua Peek
96b98ed039
Use plugin-scripts
před 15 roky
Sam Stephenson
465a1472ba
Completion for which
před 15 roky
Sam Stephenson
3644840d4b
Show usage for `rbenv which` without an argument
před 15 roky
Sam Stephenson
0632325a43
Set RBENV_DEBUG=1 to see what's going on under the hood
před 15 roky
Sam Stephenson
7ac964353f
RBENV_HOME -> RBENV_ROOT
před 15 roky
Eric Lindvall
b81b64453b
Deal with an empty result from expand_path
před 15 roky
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.
před 15 roky
Sam Stephenson
3efdf6a243
Guard against nonexistent entries in $PATH
před 15 roky
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.
před 15 roky
Ryan Baumann
bd0e1a73f9
Split rbenv-version into rbenv-version-name and rbenv-version-origin, update versions, prefix, and which appropriately
před 15 roky
Jamis Buck
5d8c40444d
iterate over all matching plugins, not just the first
před 15 roky
Jamis Buck
b6ebc2f08b
look for plugins to extend rehash and which
před 15 roky
Sam Stephenson
e0e2d93639
Add support for RBENV_VERSION=system
před 15 roky
Sam Stephenson
a62bd23ba2
Show which versions of Ruby have a command installed when rbenv-which fails
před 15 roky
Joshua Peek
43624943ee
Move subcommands into libexec/
před 15 roky
Joshua Peek
c957d83b3a
Shebang -e flag
před 15 roky
Sam Stephenson
99035a49a9
Initial commit
před 15 roky