1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:47:35 +00:00

LibCore: Enable emitting markdown from ArgsParser

ArgsParser will now automatically look for an environment variable
'ARGSPARSER_EMIT_MARKDOWN', and if it is set to exactly the string "1"
(i.e. mere presence or values like "ON" or "yes" are not enough), then
ArgsParser will emit a Markdown-formatted help message, instead of the
regular help message designed for consumption through a terminal.
This commit is contained in:
Ben Wiederhake 2021-10-23 13:22:06 +02:00 committed by Linus Groh
parent d2f9fee4ab
commit 0372f051e9
2 changed files with 85 additions and 0 deletions

View file

@ -58,6 +58,8 @@ public:
void set_general_help(const char* help_string) { m_general_help = help_string; };
void set_stop_on_first_non_option(bool stop_on_first_non_option) { m_stop_on_first_non_option = stop_on_first_non_option; }
void print_usage(FILE*, const char* argv0);
void print_usage_terminal(FILE*, const char* argv0);
void print_usage_markdown(FILE*, const char* argv0);
void print_version(FILE*);
void add_option(Option&&);