tj / commander

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

issue #81 - add after_global_options hook command #96

Closed akostadinov closed 9 years ago

akostadinov commented 9 years ago

I just tested it wokring like:

...
      after_global_options do |c|
        c.action do |args, options|
          require 'pry'
          binding.pry
        end
      end

      run!
...

I didn't write any doc as I've no idea if you like the implementation. So let me know. update: now I think more about it, perhaps it will be better to just specify the block like:

 after_global_options do |options|
  # init code
end

Would be simpler and more straightforward. If you confirm. I'll update PR.

ggilder commented 9 years ago

Since we haven't heard anything back from the original requesters of this feature, I think I'm going to go ahead and close this. Also, I've just moved the repo to https://github.com/commander-rb/commander so that I can add some stuff like Travis integration. If anyone feels strongly about revisiting this feature, please reopen a PR there. Thanks!