summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-06-07 21:56:11 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-08 11:30:58 +0200
commit00fc0a6cf045b71821fd40a3e80f0dfb6a644625 (patch)
tree566a08ed0c9c76e62d0a48264662e8cacaa10bf3
parenta32fe8df331bf25f4705a0648e5b08a3f510fed0 (diff)
downloadserenity-00fc0a6cf045b71821fd40a3e80f0dfb6a644625.zip
Shell: Make `time` stop parsing options on first non-option
-rw-r--r--Userland/Shell/Builtin.cpp1
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))