From @pruan-rht on February 16, 2015 18:0
Sometime, it's useful to be able to access options that at set in the global_option() be accessible outside of the command block so that I can do initialization of codes that are global to all sub commands. For example
global_option('-p', '--plan_id PLAN_ID_OR_NAME', 'specify the plan name or plan id')
command :rename do |c|
...
c.action do |arg, options|
...
I want to check the option plan_id outside of the c.action block for the various commands that this global_option applies to
Copied from original issue: tj/commander#94