Rewrite in fish, stop relying on bash chruby.
Fixes
Fixes
- [d377acb] fix error on any unknown chruby flags
- [a110525] correctly handle $PATH with spaces in them
Fixes
- show correct error when switching to missing Ruby
Improvements
- set $HOME, $PATH and other variables before running interactive bash shell, to support login scripts using these variables (thanks @bjeanes).
Features
- auto-create missing Rubygem bin paths to silence Fish warnings
Improvements
- some tests weren't testing the expected outcome, they now do
Fixes
-
set
GEM_PATH
correctly, Rubygems uses:
instead of Fish' spaces as a path separator -
correctly reset
PATH
when runningchruby_reset
Improvements
- make 0.7.x compatible with Fish 2.2.0, as it was before
Fixes
- show active Ruby version on running
chruby
Features
- update to work with latest chruby
Improvements
- use [Fishtape][] for tests
- update test suite to equal bash' chruby suite
- run bash' chruby in sanitised environment to prevent env variable leakage
Fixes
- run bash' chruby in an interactive shell to support sourcing
~/.bash_profile
Features
- use
CHRUBY_ROOT
instead ofCHRUBY_SOURCE
to define custom chruby path, see: 11904eb573526c14358acc1ac8c5ec25de44c6aa
Improvements
- reduce possible number of
chruby-bash
calls when callingchruby
by 1 - add
CHRUBY_VERSION
global variable - run tests on multiple Fish versions
Fixes
-
Only run
chruby_use
throughchruby_auto
if active Ruby version doesn't match.ruby-version
(thanks @dalizard) -
Work around fish-shell/fish-shell#1168 (thanks @schisamo)
Improvements
- run
chruby_auto
before every command - add tests for
chruby_auto
- return
CHRUBY_FISH_VERSION
onchruby --version
Fixes
- run bash
chruby_auto
only once - allow overriding ruby version using
chruby
when.ruby-version
is present
Improvements
- add tests for
chruby
,chruby_use
andchruby_reset
- return correct exit code if
chruby
fails - add missing global variables:
CHRUBY_FISH_VERSION
,RUBIES
,GEM_ROOT
Fixes
- only set
GEM_PATH
variable if required - use
(id -u)
instead of (non-existent)$UID
to determine user ID
Fixes
- Make chruby_auto only run on path changes and not override manual
chruby
Improvements
- Clean up files
Features
- Initial commit of
chruby-fish
wrapper scripts