Shell: Make time stop parsing options on first non-option

This commit is contained in:
Jelle Raaijmakers 2021-06-07 21:56:11 +02:00 committed by Andreas Kling
parent a32fe8df33
commit 00fc0a6cf0
Notes: sideshowbarker 2024-07-18 12:38:54 +09:00

View file

@ -878,6 +878,7 @@ int Shell::builtin_time(int argc, const char** argv)
Vector<const char*> args;
Core::ArgsParser parser;
parser.set_stop_on_first_non_option(true);
parser.add_positional_argument(args, "Command to execute with arguments", "command", Core::ArgsParser::Required::Yes);
if (!parser.parse(argc, const_cast<char**>(argv), Core::ArgsParser::FailureBehavior::PrintUsage))