mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-03 15:40:32 +00:00
Add chruby
plugin
Depends on `chruby-fish`: https://github.com/JeanMertz/chruby-fish set `CHRUBY_AUTO_ENABLED` to `false` to disable auto loading Ruby versions on directory change. set `CHRUBY_ROOT` to point to the root path of chruby. The path will be appended by `share/chruby/chruby.fish` and `share/chruby/auto.fish`.
This commit is contained in:
parent
060c730386
commit
56d0cb8cb4
9
plugins/chruby/README.md
Normal file
9
plugins/chruby/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
## chruby plugin
|
||||
|
||||
Depends on `chruby-fish`: https://github.com/JeanMertz/chruby-fish
|
||||
|
||||
set `CHRUBY_AUTO_ENABLED` to `false` to disable auto loading Ruby versions on
|
||||
directory change.
|
||||
|
||||
set `CHRUBY_ROOT` to point to the root path of chruby. The path will be
|
||||
appended by `share/chruby/chruby.fish` and `share/chruby/auto.fish`.
|
23
plugins/chruby/chruby.load
Normal file
23
plugins/chruby/chruby.load
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# Depends on `chruby-fish` (https://github.com/JeanMertz/chruby-fish)
|
||||
#
|
||||
# set `CHRUBY_AUTO_ENABLED` to `false` to disable auto loading Ruby versions on
|
||||
# directory change.
|
||||
#
|
||||
# set `CHRUBY_ROOT` to point to the root path of chruby. The path will be
|
||||
# appended by `share/chruby/chruby.fish` and `share/chruby/auto.fish`.
|
||||
#
|
||||
set -q CHRUBY_ROOT; or set CHRUBY_ROOT /usr/local
|
||||
|
||||
if test -f "$CHRUBY_ROOT/share/chruby/chruby.fish"
|
||||
. "$CHRUBY_ROOT/share/chruby/chruby.fish"
|
||||
else
|
||||
echo '`chruby` plugin loaded but chruby-fish not installed.' \
|
||||
'See: https://github.com/JeanMertz/chruby-fish'
|
||||
end
|
||||
|
||||
if test "$CHRUBY_AUTO_ENABLED" != "false" -a \
|
||||
-f "$CHRUBY_ROOT/share/chruby/auto.fish"
|
||||
|
||||
. "$CHRUBY_ROOT/share/chruby/auto.fish"
|
||||
end
|
Loading…
Reference in New Issue
Block a user