features from POSIX conventions
See original GitHub issue- I couldn’t find how to enable support of
-tls
equivalence to-l -s -t
. i.e. grouping of flags after a hyphen. - How to specify parsing of
[FILE]
part in example below? Or should I parse it from args before passing args to CommandLineUtils?
$>ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print C-style escapes for nongraphic characters
So if points above are not possible now, please consider implementing them.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
12. Utility Conventions
The following guidelines are established for the naming of utilities and for the specification of options, option-arguments, and operands. The getopt() function ......
Read more >posix
POSIX defines both the system and user-level application programming interfaces (APIs), along with command line shells and utility interfaces, for software ...
Read more >A Guide to POSIX | Baeldung on Linux
POSIX stands for Portable Operating System Interface. It's a family of standards specified by IEEE for maintaining compatibility among operating ...
Read more >What is POSIX (Portable Operating System Interface)?
POSIX (Portable Operating System Interface) is a set of standard operating system interfaces based on the Unix operating system. The most recent POSIX...
Read more >Argument Syntax (The GNU C Library)
POSIX recommends these conventions for command line arguments. getopt (see Parsing program options using getopt ) and argp_parse (see Parsing Program Options ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Implemented in f00244246a3323743440119cabd521c5fae9e00c. You can try nightlies by using this feed: https://www.myget.org/gallery/natemcmaster/. This behavior will be enabled by default in 2.3.0 unless we detect there would be issues due to the app having short options with multiple characters. In 3.0, I’ll make short options with multiple characters an error unless you disable clustering explicitly.
Multi-character short options are not supported in clustered groups. POSIX clustering requires single letter options only. By default (i.e. you haven’t called
ParserSettings.ClusterOptions = true
), clustering is will be enabled if and only if there are no multi-character short option name. If you’ve explicitly enabled clustering and add a multi-character option, the library with throw an error.Re: the
-v
,-vv
,-vvv
options. CLU will keep track of how many times NoValue options are specified. If you wanted to take advantage of clustering, you could do this instead: