chruby icon indicating copy to clipboard operation
chruby copied to clipboard

Rewrite chruby-exec as a function

Open postmodern opened this issue 11 years ago • 2 comments

If chruby-exec were a function, it would always run in the current shell. It could also reuse other chruby functions.

Pseudo Code

function chruby_exec()
{
  (chruby $arguments && eval $command)
}

postmodern avatar Apr 12 '13 06:04 postmodern

If chruby-exec is a function, won't it no longer be usable as a way to use chruby-based installs via cron?

halostatue avatar Aug 29 '13 14:08 halostatue

Correct. It would force users to explicitly invoke chruby-exec within a shell. This would be one way to prevent users from invoking chruby-exec under the dash shell. Of course, maybe people should just go back to bash -l -c "chruby ...; command here".

postmodern avatar Aug 29 '13 22:08 postmodern