rbenv / rbenv-each

rbenv plugin to Run a command across all installed rubies.
Creative Commons Zero v1.0 Universal
91 stars 18 forks source link

Skip alias versions by default, add --aliases. #19

Open ab opened 8 years ago

ab commented 8 years ago

By default, skip ruby versions that are aliases. I'm having a hard time thinking of any reason you would want to run the command on the same ruby version multiple times by default.

Also tweak the option parsing and usage messages in support of this change.

With versions 2.1 => 2.1.7, 2.1.6, and 2.1.7:

$ rbenv each ruby --version
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
ruby 2.1.7p400 (2015-08-18 revision 51632) [x86_64-linux]

$ rbenv each --aliases ruby --version
ruby 2.1.7p400 (2015-08-18 revision 51632) [x86_64-linux]
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
ruby 2.1.7p400 (2015-08-18 revision 51632) [x86_64-linux]

Happy to revise / edit this PR as desired.

mislav commented 8 years ago

Thanks for suggesting this change. I generally support the idea, but I'd like to first ship rbenv 1.0 and other PRs to this repo before this one.

ab commented 8 years ago

Cool, thanks. Let me know if I can help.

mislav commented 8 years ago

Rbenv 1.0 has shipped and we could use this feature. Could you rebase your PR so it's mergeable? Thanks!

ab commented 8 years ago

Rebased & changed option name to --with-aliases. Thanks for re-raising this.

ab commented 8 years ago

Anything else needed here?

ab commented 8 years ago

Ping