diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-06-07 21:56:11 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-08 11:30:58 +0200 |
commit | 00fc0a6cf045b71821fd40a3e80f0dfb6a644625 (patch) | |
tree | 566a08ed0c9c76e62d0a48264662e8cacaa10bf3 | |
parent | a32fe8df331bf25f4705a0648e5b08a3f510fed0 (diff) | |
download | serenity-00fc0a6cf045b71821fd40a3e80f0dfb6a644625.zip |
Shell: Make `time` stop parsing options on first non-option
-rw-r--r-- | Userland/Shell/Builtin.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Shell/Builtin.cpp b/Userland/Shell/Builtin.cpp index 55b2b5ef2d..8c0d7d50a8 100644 --- a/Userland/Shell/Builtin.cpp +++ b/Userland/Shell/Builtin.cpp @@ -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)) |