enum style_t

Description

Various possible styles of options. There are "long" options, which start with "--" and "short", which start with either "-" or "/". Both kinds can be allowed or disallowed, see allow_long and allow_short. The allowed character for short options is also configurable. Option's value can be specified in the same token as name ("--foo=bar"), or in the next token. It's possible to introduce long options by the same character as short options, see allow_long_disguise. Finally, guessing (specifying only prefix of option) and case insensitive processing are supported.

Declared at: libs/pika/program_options/include/pika/program_options/cmdline.hpp:29

Enumerators

NameValueComment
allow_long1Allow "--long_name" style
allow_short2Allow "- <single character" style
allow_dash_for_short4Allow "-" in short options
allow_slash_for_short8Allow "/" in short options
long_allow_adjacent16Allow option parameter in the same token for long option, like in
long_allow_next32Allow option parameter in the next token for long options.
short_allow_adjacent64Allow option parameter in the same token for short options.
short_allow_next128Allow option parameter in the next token for short options.
allow_sticky256Allow to merge several short options together, so that "-s -k" become "-sk". All of the options but last should accept no parameter. For example, if "-s" accept a parameter, then "k" will be taken as parameter, not another short option. Dos-style short options cannot be sticky.
allow_guessing512Allow abbreviated spellings for long options, if they unambiguously identify long option. No long option name should be prefix of other long option name if guessing is in effect.
long_case_insensitive1024Ignore the difference in case for long options.
short_case_insensitive2048Ignore the difference in case for short options.
case_insensitive3072Ignore the difference in case for all options.
allow_long_disguise4096Allow long options with single option starting character, e.g -foo=10
unix_style1015The more-or-less traditional unix style.
default_style1015The default style.