function init --on-event init_gem
  if test -n "$GEM_ROOT"
    set -gx GEM_HOME $GEM_ROOT
    if not contains $GEM_ROOT/bin $PATH
      set -x PATH $GEM_ROOT/bin $PATH
    end
  end
end

if test -n "$GEM_ROOT"
  set -gx GEM_HOME $GEM_ROOT
  if not contains $GEM_ROOT/bin $PATH
    set -x PATH $GEM_ROOT/bin $PATH
  end
end

Initialize immediately, rather than waiting for an event.
Initialize immediately, rather than waiting for an event.

oh-my-fish/plugin-gem