Closed chino closed 9 years ago
No, we're not going to do anything tricky like that. If you find yourself needing to do some shell functions/piping across rbenv versions, you could simply:
for v in `rbenv versions --bare`; do RBENV_VERSION=$v gem list | grep "a b"; done
Yea, I just basically took that and change it to call eval "$@"
and it seems to work great...
Would be cool if rbenv-each supported it.
I want to refrain from doing eval internally since that is not how I want people to use rbenv-each.
However you can always execute bash interpreter with any script that you want:
rbenv each bash -c 'gem list | grep "a b"'
Hm, your right. I forget off top of my head and I'm on road right now but does rbenv support aliases? It could be a simple handy alias.
On Wed, Jan 21, 2015, 6:20 PM Mislav Marohnić notifications@github.com wrote:
I want to refrain from doing eval internally since that is not how I want people to use rbenv-each.
However you can always execute bash interpreter with any script that you want:
rbenv each bash -c 'gem list | grep "a b"'
— Reply to this email directly or view it on GitHub https://github.com/chriseppstein/rbenv-each/issues/14#issuecomment-70942399 .
rbenv doesn't support aliases but your shell does ;)
alias rbenv-each-eval='rbenv each bash -c'
I agree. However I do like git aliases even though they could just be shell aliases :)
On Wed, Jan 21, 2015, 7:10 PM Mislav Marohnić notifications@github.com wrote:
rbenv doesn't support aliases but your shell does ;)
alias rbenv-each-eval='rbenv each bash -c'
— Reply to this email directly or view it on GitHub https://github.com/chriseppstein/rbenv-each/issues/14#issuecomment-70948218 .
It would be nice to simply eval whatever is left on the command line.
For instance I'd love to do:
With proper quoting support so that the grep in the example above works appropriately.