davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

"--version" produces too much output #64

Closed ruafozy closed 11 years ago

ruafozy commented 11 years ago

"--version", if generated with Methadone::Main#version, causes the entire usage message to be output. This is against Unix conventions.

By way of comparison, consider the output of "ruby --version", "python --version", "perl --version", or "ls --version".

The GNU coding standards specify the behaviour of "--version":

http://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion

ruafozy commented 11 years ago

Granted, it's probably impractical to have #version implement the GNU coding standards. Instead, I think it should copy Python, and simply give the application's name and its version string.

davetron5000 commented 11 years ago

This will be in the next release, see 1932c827bdcb7b512d437914267a5a42e556902a