c++ - How to change --usage output with argp? -
i built program config file parser , cli options.
my goal have order of priority :
- cli options configuration
- mandatory configuration file
- hardcoded default configuration
while parsing cli arguments argp need read path config file first (which not option) other cli options override config file settings.
as described in glibc argp documentation, options read first non-option arguments, unless use argp_in_order
flag. in case arguments read first last (option or not).
in case, first mandatory argument path config file. behave expected, except usage output.
i have :
usage: myprogramm [option...] configurationfile
i need :
usage: myprogramm configurationfile [option...]
is there way place non-optional arguments first in usage output?
Comments
Post a Comment