Commit Graph

12 Commits (master)

Author SHA1 Message Date
Denis Knauf c946a093f7 aliases are strings only or nil. more examples. 2022-01-30 14:18:20 +01:00
Denis Knauf 616989e96a ruby3: Opt.new: optional default - CMD.opt needs support. 2021-12-31 13:55:27 +01:00
Denis Knauf a00149ce6a ruby2.5: @os removed - OptionParser does not expect any **options, so we need not it. 2021-12-31 13:47:54 +01:00
Denis Knauf 7078305256 print exception for tests (if occur or -v) 2021-12-09 14:16:08 +01:00
Denis Knauf 2c654f2941 noshortaliases. warn or raise if alias already exists 2021-12-09 13:17:13 +01:00
Denis Knauf 6254349aa9 tests implemented. do not overwrite cmds by aliases. `call *a, **o` behaviour differs 2.5 <=> 2.7 2021-12-09 13:02:12 +01:00
Denis Knauf 3cc205cb02 ruby-2.5-support fix. usage with rest-arguments.
ruby-2.5 does not support `String#split() {|t|}`.  splits are replaced
by `String#split().each {|t|}`.

Usage supports printing rest-arguments.  It uses the name with three dots:

  command [<argname> ...]

Sub-commands has a generic `<command> ...` or `[<command> ...]`.
The last will be used if a nil-aliases exists.
2021-12-08 23:52:05 +01:00
Denis Knauf d2158e08ea Usage of short options without `=` 2021-12-08 00:17:37 +01:00
Denis Knauf df15912e7a Sub#commands|CMD#commands should yield(name,self).
assert_type for debugging.  Commented out.
2021-12-07 23:48:28 +01:00
Denis Knauf 09c4c46d25 help_full for printing recursive all available commands. support for --[no-]opt. 2021-11-30 23:09:06 +01:00
Denis Knauf d3930c00bc opts-mething redesign. completion improved. example: args-command for demonstrate arguments and options. 2021-11-30 15:23:05 +01:00
Denis Knauf ec3a936b36 example added. bugfixes. .gitignore 2020-12-13 17:06:00 +01:00