gem_home icon indicating copy to clipboard operation
gem_home copied to clipboard

Optional auto-switching

Open estum opened this issue 10 years ago • 2 comments

This commit provides the same workflow as chruby's auto.sh. When auto.sh script loaded into environment, it makes gem_home to automatically use a .ruby-gemhome to get project's $GEM_HOME path (.ruby-gemhome filename is customizable by the $GEM_HOME_FILENAME variable).

estum avatar Apr 11 '15 18:04 estum

One major problem with this is that you cannot have multiple traps on bash. It's also very difficult to get the current trap command and append to it.

postmodern avatar May 27 '15 20:05 postmodern

@postmodern Would it be possible to detect the chruby auto switching here and set up a trap that does both things? Likewise in chruby's auto we could detect the gem_home auto behavior and set up the trap.

if bash
  if $USING_CHRUBY_AUTO
    trap gem_home and chruby stuff
  else
    trap gem_home stuff
  end
end

calebhearth avatar Dec 06 '17 15:12 calebhearth