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

Utilities: Use new ArgsParser method for enum values

This commit is contained in:
Sam Atkins 2023-09-24 16:13:19 +01:00 committed by Jelle Raaijmakers
parent f71d74ed65
commit 34940821f6
3 changed files with 5 additions and 45 deletions

View file

@ -118,15 +118,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
return true;
} });
args_parser.add_option({ Core::ArgsParser::OptionArgumentMode::None,
"Equivalent to specifying -t o.",
nullptr,
'o',
nullptr,
[&string_offset_format](auto) {
string_offset_format = StringOffsetFormat::Octal;
return true;
} });
args_parser.add_option(string_offset_format, StringOffsetFormat::Octal, "Equivalent to specifying -t o.", nullptr, 'o');
args_parser.set_general_help("Write the sequences of printable characters in files or pipes to stdout.");
args_parser.add_positional_argument(paths, "File path", "path", Core::ArgsParser::Required::No);
args_parser.parse(arguments);