Mislav Marohnić
5287e2ebf4
Avoid slow abs_dirname()
by loading realpath
extension
...
This speeds up every `rbenv` invocation significantly.
2014-10-13 04:12:34 +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
Mislav Marohnić
f237a11f4f
Have versions
emit a warning when no Ruby version was found
2014-10-13 04:02:04 +02:00
Makoto Sasaki
77d9e34a49
v20141012
2014-10-12 21:48:56 +09:00
Makoto Sasaki
d38f00cd4a
v20141011
2014-10-11 20:00:54 +09:00
Makoto Sasaki
ff995b6654
v20141008
2014-10-08 19:29:20 +09:00
Yamashita Yuu
ab9ee414ad
v20140924
2014-09-24 13:57:53 +09:00
Daniel Hahler
9901c4b84d
Use consistent quoting for versions=("$@")
across bins
2014-09-11 12:59:40 +02:00
Daniel Hahler
b6aef96cea
pyenv-version-file-write: do not use rm, but clobber the file
...
With e.g. /usr/local/bin/.python-version owned by some user, `pyenv
local foo` would fail, if the user has no permissions for
`/usr/local/bin`, but only the `.python-version` file.
2014-09-07 16:56:40 +02:00
Yamashita Yuu
6509d318f4
v20140825
2014-08-25 10:21:26 +09:00
Yamashita Yuu
b8a7de8a3c
v20140705 ( fixes #204 )
2014-07-06 00:35:50 +09:00
Yamashita Yuu
6f761f8159
Remove exit 0
from initialization code of fish
2014-06-30 23:00:09 +09:00
Yamashita Yuu
0468ffdd49
v20140628
2014-06-28 18:04:17 +09:00
Makoto Sasaki
21c0d930e9
v20140615
2014-06-15 05:37:34 +09:00
Yamashita Yuu
2b5ee0c425
v20140614
2014-06-14 14:38:13 +09:00
Yamashita Yuu
6efe6dafe7
Changed versioning scheme; 0.4.0-20140602
-> 20140602
2014-06-04 13:40:16 +09:00
Mislav Marohnić
13a474c4e9
Get rid of explicit exit in fish branch of rbenv-init
...
Allows for code to be added to the end of the script which will not
mysteriously fail to run for fish shell.
2014-06-03 00:39:34 +07:00
Yamashita Yuu
d378b274d9
v20140602
2014-06-02 11:27:24 +09:00
Yamashita Yuu
033529915e
v20140520
2014-05-20 12:28:04 +09:00
Yamashita Yuu
ef8c8b8ef2
v20140516
2014-05-16 21:07:19 +09:00
Yamashita Yuu
0c81002220
Prefer gawk over awk if both are available.
2014-05-01 13:09:55 +09:00
Adam Harvey
808527b5d0
Prefer gawk over awk if both are available.
2014-04-18 10:40:56 +10:00
Yamashita Yuu
3cde540ca0
v20140404
2014-04-04 13:16:27 +09:00
Yamashita Yuu
34065dddbb
reads only the first word from file
2014-03-24 19:42:52 +09:00
Yamashita Yuu
ea9214bb2e
ignores carriage returns
2014-03-24 18:15:40 +09:00
Vincent Robert
b025dfcf58
Add \r to IFS instead of removing it manually
2014-03-21 01:36:39 +01:00
Vincent Robert
f50cee2ac7
Simplify bash expression
2014-03-20 16:52:45 +01:00
Vincent Robert
2fd3b18d39
Remove carriage return characters in version file
...
When created on Windows, .rbenv-version or .ruby-version files may have CR characters that will prevent rbenv from correctly parsing the Ruby version. Discard those characters when reading the file.
2014-03-20 11:30:27 +01:00
Yamashita Yuu
0d51899e9b
v0.4.0-20140317
2014-03-17 21:51:40 +09:00
Daniel Hahler
44c20af80e
Optimize pyenv-which: implement remove_from_path in Bash
...
This greatly improves the performance of `pyenv virtualenvwrapper_lazy`,
which happens to call pyenv-which a lot.
For profiling I've initially used:
% zmodload zsh/zprof
% eval "$(pyenv init -)"
% pyenv virtualenvwrapper_lazy
Before:
% zprof|grep -E '(pyenv|virtualenv)'
1) 1 754,07 754,07 58,95% 751,50 751,50 58,75% pyenv
21) 1 2,57 2,57 0,20% 2,57 2,57 0,20% virtualenvwrapper_setup_lazy_loader
1) 1 754,07 754,07 58,95% 751,50 751,50 58,75% pyenv
1/1 2,57 2,57 0,20% 2,57 2,57 virtualenvwrapper_setup_lazy_loader [21]
1/1 2,57 2,57 0,20% 2,57 2,57 pyenv [1]
21) 1 2,57 2,57 0,20% 2,57 2,57 0,20% virtualenvwrapper_setup_lazy_loader
After:
% zprof|grep -E '(pyenv|virtualenv)'
1) 1 383,30 383,30 27,97% 380,88 380,88 27,79% pyenv
31) 1 2,42 2,42 0,18% 2,42 2,42 0,18% virtualenvwrapper_setup_lazy_loader
1) 1 383,30 383,30 27,97% 380,88 380,88 27,79% pyenv
1/1 2,42 2,42 0,18% 2,42 2,42 virtualenvwrapper_setup_lazy_loader [31]
1/1 2,42 2,42 0,18% 2,42 2,42 pyenv [1]
31) 1 2,42 2,42 0,18% 2,42 2,42 0,18% virtualenvwrapper_setup_lazy_loader
Fixes https://github.com/yyuu/pyenv-virtualenvwrapper/issues/13
2014-03-13 19:21:32 +01:00
Yamashita Yuu
65ae0a3261
v0.4.0-20140311
2014-03-11 11:55:44 +09:00
Yamashita Yuu
e835d447ed
v0.4.0-20140211
2014-02-11 12:11:38 +09:00
Yamashita Yuu
73d5ea7426
v0.4.0-20140123
2014-01-23 19:14:26 +09:00
Yamashita Yuu
9c82314570
Unset GREP_OPTIONS
to avoid unexpected grep behavior ( fixes #101 )
2014-01-23 11:11:56 +09:00
Yamashita Yuu
314937d599
Set PYENV_BIN_PATH
in PATH
even if the version is system
( fixes #98 )
2014-01-15 16:41:06 +09:00
Yamashita Yuu
a7f5a19a24
v0.4.0-20140110.1
2014-01-10 15:04:16 +09:00
Yamashita Yuu
38eb9fe948
v0.4.0-20140110
2014-01-10 11:27:43 +09:00
kou1okada
5c1094adb9
Response enhancement for in the case of the working directory under the UNC path.
...
finding_local_version_file is extremely slow, when working directory is under the UNC path.
Because //host/.rbenv-version and //.rbenv-version do not exist, but testing them is so slow.
It's the reason to make a serious delay of the response, when the Ruby runs with a current working directory under the UNC path under Cygwin environment.
A response of before applying this patch.
//somehost/somedir $ time ruby -e "exit"
real 0m13.922s
user 0m0.168s
sys 0m0.287s
A response of after applying this patch.
//somehost/somedir $ time ruby -e "exit"
real 0m0.721s
user 0m0.153s
sys 0m0.319s
2014-01-09 15:31:29 +09:00
Yamashita Yuu
71a916faf2
simplicy the check for infinite loop
2014-01-08 10:54:11 +09:00
Yamashita Yuu
4c5ffc8d99
Avoid infinite loop in case where pwd
returns relative path
...
The `pwd` may return relative path if the `$PWD` is badly declared
in bash/zsh (e.g. `PWD="." bash`). To avoid the infinite loop in
`find_local_version_file()`, stop finding the version file if the
target paths are same consecutively.
2014-01-03 08:35:39 +09:00
Yamashita Yuu
8dc4e8d6f8
Revert "Merge branch 'golang-workaround'"
...
This reverts commit 7edceff71ca6aa1281658f6f60ca2e48a6e3f45f, reversing
changes made to 5dea3c9e63e49b69284822f8f529778e6b55adf0.
2014-01-03 07:39:52 +09:00
Mislav Marohnić
1a6bada94c
Fix detecting parent shell on OpenBSD and Cygwin
...
It seems that "comm" header can't be relied on cross-platform, but that
"ucomm" is more portable. I have no idea whether it's the right value to
use here, but it seems to be doing the job.
Also strip trailing whitespace because OpenBSD 5.4 `ps` output is padded
with spaces for some reason.
Fixes #489
2014-01-02 22:36:03 +01:00
Mislav Marohnić
eda535a942
Fix detecting completions support on OpenBSD
...
The non-extended regex pattern didn't work on OpenBSD so this switches
grep to extended pattern mode that seems to work consistenty on all
systems.
2014-01-02 22:33:54 +01:00
Yamashita Yuu
1587d8a03c
Apply readlink to output from pwd
may returns "." to get actual path
2014-01-03 05:07:21 +09:00
Yamashita Yuu
5dea3c9e63
Import changes from recent rbenv
2014-01-03 04:58:44 +09:00
Yamashita Yuu
3dd9332eee
Fix broken tests
2014-01-03 04:33:30 +09:00
Yamashita Yuu
f538169992
Restore OLDIFS expectedly
2014-01-03 01:47:10 +09:00
Yamashita Yuu
d03f290b5d
s/rbenv/pyenv/
2014-01-02 22:49:23 +09:00
Yamashita Yuu
8ddf8760d5
Import recent changes from rbenv 0.4.0
2014-01-02 22:45:02 +09:00
wmoxam
2f5d9a6f90
Fixes rbenv on OpenBSD and any other systems that don't support head -c
2013-12-31 01:44:36 -05:00