postmodern / chruby

Changes the current Ruby
MIT License
2.88k stars 189 forks source link

Rubies listed and fuzzy matched lexicographically instead of numerically #280

Closed gwagener closed 10 years ago

gwagener commented 10 years ago

Actual result

Versions of JRuby and Rubinius with bug fix versions ≥ 10 are listed before 2..9 and consequently not given preference by fuzzy matching.

...:(master=)~/...$ chruby jruby
...:(master=)~/...$ chruby
   jruby-1.7.13
 * jruby-1.7.5
   rbx-2.2.10
   rbx-2.2.6
   ruby-1.9.3-p547
   ruby-2.0.0-p481
   ruby-2.1.2
...:(master=)~/...$ chruby --version
chruby: 0.3.8

Expected result

Versions should be listed in numeric order so 2.2.1 < 2.2.5 < 2.2.10.

...:(master=)~/...$ chruby jruby
...:(master=)~/...$ chruby
   jruby-1.7.5
 * jruby-1.7.13
   rbx-2.2.6
   rbx-2.2.10
   ruby-1.9.3-p547
   ruby-2.0.0-p481
   ruby-2.1.2

Thanks!

postmodern commented 10 years ago

See pull #278.

gwagener commented 10 years ago

Darn, I searched through all the issues, but forgot to look through pull requests. Sorry!