Closed btamayo closed 5 years ago
Hello, argbash supports this functionality by default. The only thing you need is to declare multiple optional arguments with short options. I was not able to find name of this behavior, so now it is being referred to as (short) option grouping.
Can I close this as resolved, or did you have an actual example in your mind?
@matejak Hi! Yes, sorry. :) I understand you, would be great if that were a bit clearer in the docs.
See the ARG_OPTION_STACKING
macro documented at https://argbash.readthedocs.io/en/latest/guide.html#convenience-macros
If you think that the documentation is insufficient, feel free to suggest improvements and reopen the issue.
I would like to see please an example with the following type of options, where the short bool options (flags) can be combined into a single option:
Example:
Simple:
Where the options
-x
,-v
,-z
,-f
are combined.Slightly more complex:
Flags combined + case sensitive argument (
-C
) + positional (filename "abc.tar.gz"):Examples from: http://www.binarytides.com/linux-tar-command/
At the moment, I'm not sure how much support argbash templates and API have for these flags.