1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

LibCore: Allow ArgsParser::parse() to not exit on failure

This allows its use in places where multiple calls to
ArgsParser::parse() are needed, such as Shell builtins.
This commit is contained in:
AnotherTest 2020-05-16 01:50:46 +04:30 committed by Andreas Kling
parent 16ba0b39f3
commit 1c4f38749e
2 changed files with 18 additions and 6 deletions

View file

@ -66,7 +66,7 @@ public:
Function<bool(const char*)> accept_value;
};
void parse(int argc, char** argv);
bool parse(int argc, char** argv, bool exit_on_failure = true);
void print_usage(FILE*, const char* argv0);
void add_option(Option&&);