Skip to content

Commit

Permalink
Shell: Make time stop parsing options on first non-option
Browse files Browse the repository at this point in the history
  • Loading branch information
gmta authored and awesomekling committed Jun 8, 2021
1 parent a32fe8d commit 00fc0a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Userland/Shell/Builtin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 00fc0a6

Please sign in to comment.