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

LibCore: Replace the ArgsParser option argument setting with an enum

Replacement conditions for `requires_argument` have been chosen based
on what would be most convenient for implementing an eventual optional
argument mode.
This commit is contained in:
Tim Schumacher 2022-07-12 22:13:38 +02:00 committed by Linus Groh
parent 810b9daa63
commit 3d51642037
15 changed files with 59 additions and 53 deletions

View file

@ -121,7 +121,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_option(flag_noheader, "Turn off the header describing the command and interval", "no-title", 't');
args_parser.add_option(flag_beep_on_fail, "Beep if the command has a non-zero exit code", "beep", 'b');
Core::ArgsParser::Option file_arg {
.requires_argument = true,
.argument_mode = Core::ArgsParser::OptionArgumentMode::Required,
.help_string = "Run command whenever this file changes. Can be used multiple times.",
.long_name = "file",
.short_name = 'f',