mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
Shell: Make time
stop parsing options on first non-option
This commit is contained in:
parent
a32fe8df33
commit
00fc0a6cf0
Notes:
sideshowbarker
2024-07-18 12:38:54 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/00fc0a6cf04 Pull-request: https://github.com/SerenityOS/serenity/pull/7896 Reviewed-by: https://github.com/awesomekling
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue