Vincent Robert
b025dfcf58
Add \r to IFS instead of removing it manually
pirms 10 gadiem
Vincent Robert
f50cee2ac7
Simplify bash expression
pirms 10 gadiem
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.
pirms 10 gadiem
wmoxam
2f5d9a6f90
Fixes rbenv on OpenBSD and any other systems that don't support head -c
pirms 10 gadiem
Mislav Marohnić
681435e0b4
Simplify version-file-read to avoid process substitution
Process substitution seems to be causing problems with some versions of
bash on specific systems.
Fixes #401
pirms 11 gadiem
Sam Stephenson
37eca782cc
Documentation tweaks
pirms 11 gadiem
Mislav Marohnić
3436bddaea
new-style documentation for most commands
pirms 11 gadiem
Mislav Marohnić
21391c8d2f
put up a note why `version-file-read` is tricky
pirms 11 gadiem
Joshua Peek
149e61a649
Don't exit out of piped loop
Can cause the stdin of cat to close too soon causing:
echo: write error: Broken pipe
Fixes #97
pirms 13 gadiem
Sam Stephenson
0632325a43
Set RBENV_DEBUG=1 to see what's going on under the hood
pirms 13 gadiem
Sam Stephenson
e5c0fd22e1
Exit with 0 status when a version file is read successfully
pirms 13 gadiem
Sam Stephenson
db2a94d4bc
`rbenv-version-name` returns `system` for empty version files. Closes #62 , #65 , #77 .
pirms 13 gadiem
Sam Stephenson
837bfc5aa9
Fix rbenv-version-file-read for version files without trailing newlines
pirms 13 gadiem
Sam Stephenson
506bc3634f
Extract rbenv-version-file{,-read,-write}
pirms 13 gadiem