test/apps/todo/bin/todo in gli-2.11.0 vs test/apps/todo/bin/todo in gli-2.12.0
- old
+ new
@@ -18,10 +18,11 @@
wrap_help_text (ENV['TODO_WRAP_HELP_TEXT'] || 'to_terminal').to_sym
synopsis_format (ENV['SYNOPSES'] || 'full').to_sym
hide_commands_without_desc ENV['HIDE_COMMANDS_WITHOUT_DESC'] === 'true'
subcommand_option_handling :normal
+arguments :strict
program_desc 'Manages tasks'
program_long_desc "A test program that has a sophisticated UI that can be used to exercise a lot of GLI's power"
config_file "gli_test_todo.rc"
@@ -39,10 +40,15 @@
command :first do |c| c.action { |g,o,a| puts "first: #{a.join(',')}" } end
arg :argument, :optional
command :second do |c| c.action { |g,o,a| puts "second: #{a.join(',')}" } end
+arg :first
+arg :second
command :chained => [ :first, :second ]
+
+arg :first
+arg :second
command [:chained2,:ch2] => [ :second, :first ]
pre do |global,command,options,args|
# Pre logic here
# Return true to proceed; false to abort and not call the