Six section names (include directives) are supported in the help files, and one (@All) in the usage files. These are introduced with the ARGPARSER_HELP_FILE_INCLUDE_CHAR or ARGPARSER_USAGE_FILE_INCLUDE_CHAR, respectively, defaulting to "@".
@Alldirective@<ArgumentGroup>directive@Descriptiondirective@Headerdirective@Helpdirective@Remarkdirective@Usagedirective
For help messages, the @All directive comprises all include directives in the following order: @Usage, @Description, @Remark, @<ArgumentGroup>, and @@Help, separated from each other by a blank line.
Consequently, the help message generated from the ARGPARSER_HELP_FILE with the following content:
@All
is exactly identical to the one from the following content (note the blank lines):
@Usage
@Description
@Remark
@<ArgumentGroup>
@@Help
When not using help or usage files, the Argparser internally uses the @All include directive, and thus generates an identical help message.
For usage messages, @All prints the usual usage message, which currently isn't subdivided into distinct include directives.
The @<ArgumentGroup> directive prints the help message block for the respective "<ArgumentGroup>", like "Mandatory options" for the include directive @Mandatory options or "Optional options" for the include directive @Optional options.
Their order in the auto-generated help message would be alphabetical for the keyword arguments, preceded by the group for the positional arguments (the ARGPARSER_POSITIONAL_ARG_GROUP) and succeeded by the help options group (the ARGPARSER_HELP_ARG_GROUP). Thus, if you have reasons for another structure, you need an ARGPARSER_HELP_FILE, denoting all arguments groups in the order preferred by you.
By using one ARGPARSER_HELP_FILE_INCLUDE_CHAR, the arguments group's arguments are preceded by the group's name as section heading. You can double the include character to suppress this addition.
The @Description directive prints the contents of ARGPARSER_HELP_DESCRIPTION, wrapped to fit ARGPARSER_MAX_WIDTH. If ARGPARSER_HELP_DESCRIPTION is empty (the default), nothing is printed.
The @Header directive comprises the @Usage, @Description and @Remark include directive, separated from each other by a blank line, and is thus the shorthand for including all three.
The @Help directive prints the help text for the --help, --usage, and --version flags (if added to the arguments definition by ARGPARSER_ADD_HELP, ARGPARSER_ADD_USAGE, or ARGPARSER_ADD_VERSION). Usually, you want to give this at the very end of all options. Again, you can suppress the ARGPARSER_HELP_ARG_GROUP heading by doubling the ARGPARSER_HELP_FILE_INCLUDE_CHAR, which is also the default behaviour within the @All include directive (and thus the default when not using help files).
The @Remark directive prints the note that mandatory arguments to long options are mandatory for short options too, wrapped to fit ARGPARSER_MAX_WIDTH. This should be given just before all arguments.
The @Usage directive prints the line Usage: <script_name> ..., with <script_name> replaced by ARGPARSER_SCRIPT_NAME, defaulting to your script's name. This should be given as first line.