开发者

switch ruby for a single command via rvm

开发者 https://www.devze.com 2023-02-07 05:03 出处:网络
I want to use e.g. system capistrano/ru开发者_运维知识库co/xxx and not add them to every ruby/gemset i create.

I want to use e.g. system capistrano/ru开发者_运维知识库co/xxx and not add them to every ruby/gemset i create.

So usually do rvm ruby_with_all_gems ... do_something ... rvm back_to_other

Is there any nice solution that i could use to do e.g. alias capree="rvm with ree cap" ?


rvm exec ree cap its already built i to rvm :>


I would suggest using a function:

Pseudo code:

capree () {
    save rvm state
    do rvm op with args "$@"
    restore rvm state
}
0

精彩评论

暂无评论...
验证码 换一张
取 消