Reputation: 41
Does picocli support the tar-style option simplification, for example single character options do not required to prefix a group of options with a dash. For example the following are equivalent:
tar -t -v -f file
tar -tvf file
tar tvf file
Upvotes: 0
Views: 19
Reputation: 36834
Yes, picocli supports POSIX short options out of the box.
Specifically, option names consisting of a single "dash" -
followed by a single character are considered POSIX short options and these may be clustered, so tar -t -v -f FILE
is equivalent to tar -tvfFILE
. I believe this follows the POSIX standard (Guideline 5).
However, picocli will not recognize the third pattern you describe: tar xvf FILE
: the initial leading dash or hyphen -
character is required.
Upvotes: 2