tj / commander

The complete solution for Ruby command-line executables
http://visionmedia.github.com/commander
MIT License
1.09k stars 64 forks source link

-t and --trace confused #82

Closed tejasmanohar closed 9 years ago

tejasmanohar commented 9 years ago

command :test do |c|
  c.syntax = 'lol test  [options]'
  c.summary = 'Create new object'
  c.example 'description', 'ifttt create -t frontend'
  c.option '-t', 'Create team'
  c.option '-u', 'Create user'
  c.action do |args, options|
    p options
  end
end

$ lol test -t bots returns <Commander::Command::Options trace=true> instead of (expected) <Commander::Command::Options t=true>.

What is the reason for this? How can it be resolved?

tejasmanohar commented 9 years ago

Nevermind, I'll override - https://github.com/tj/commander/blob/master/lib/commander/runner.rb#L60