Commit graph

15 commits

Author SHA1 Message Date
Mislav Marohnić
8275e15cb0
Use read -a to split output into an array (#1450) 2022-10-09 14:48:13 +02:00
Mislav Marohnić
117a381575
Simplify resolving symlinks, remove native extension (#1428) 2022-09-22 11:34:02 +02:00
Mislav Marohnić
dcba8b4064 Supply head -n flag explicitly
The syntax `head -NUM` was deprecated in the POSIX standard.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html
2021-05-05 22:42:56 +02:00
Mislav Marohnić
af454a32dc Silence errors when piping type | head -1 2019-10-23 12:12:38 +02:00
Mislav Marohnić
40c1d27445 Merge remote-tracking branch 'origin/master' into version-hooks 2015-12-23 17:22:43 +01:00
Jason Karns
97f0499f43 add version-name/version-origin to hooks completion 2015-12-23 17:22:31 +01:00
Mislav Marohnić
7026e529c7 Fix realpath fallback in rbenv hooks
The symlinks weren't correctly resolved if they were pointing to a
single path component, such as `ln -s foo bar`.
2015-10-27 21:05:10 +01:00
Mislav Marohnić
3f74da0e73 Fail hard if RBENV_NATIVE_EXT is set but extensions failed to load 2014-10-13 04:12:35 +02:00
Mislav Marohnić
16c7eb4135 Speed up realpath() with dynamically loaded C extension
On systems that support both C compiling and dynamic loading, we can
speed up `realpath()` (where most time in rbenv is spent) by replacing
it with a dynamically loaded bash builtin.

When `make -C src` is called in the project's root,
`libexec/rbenv-realpath.dylib` will be created. If it exists, rbenv will
attempt to load it as a builtin command. If it fails, execution will
fall back to the old `realpath()` shell function.
2014-10-13 04:12:34 +02:00
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
2013-06-07 19:16:38 +02:00
Mislav Marohnić
baf7656d2f fix iterating through paths that have spaces in them
Fixes #344, #196
2013-04-01 01:04:19 +02:00
Mislav Marohnić
ea3203dbab fix resolving symlinks in rbenv-hooks 2013-03-08 14:35:46 -05:00
Sam Stephenson
4b6c91e827 Usage consistency 2012-12-30 16:00:53 -06:00
Mislav Marohnić
3436bddaea new-style documentation for most commands 2012-12-29 23:34:53 +01:00
Sam Stephenson
f9fb3c934e rbenv-plugin-scripts -> rbenv-hooks; RBENV_PLUGIN_PATH -> RBENV_HOOK_PATH 2011-09-23 10:43:06 -05:00
Renamed from libexec/rbenv-plugin-scripts (Browse further)