diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2021-06-07 21:27:21 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-08 11:30:58 +0200 |
commit | 001c81b1be3780c52910d72f84a3899b79f1598e (patch) | |
tree | 5d8b0c2af3a7261c08928a6d63ccad0b528e12fa | |
parent | d7126fbbc2b03d005370ffb8d1195c6d11f11ec9 (diff) | |
download | serenity-001c81b1be3780c52910d72f84a3899b79f1598e.zip |
Userland: Let `env` parse options up to first non-option
-rw-r--r-- | Userland/Utilities/env.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Utilities/env.cpp b/Userland/Utilities/env.cpp index 5e07641d83..3b4bfcf668 100644 --- a/Userland/Utilities/env.cpp +++ b/Userland/Utilities/env.cpp @@ -22,6 +22,8 @@ int main(int argc, char** argv) Vector<const char*> values; Core::ArgsParser args_parser; + args_parser.set_stop_on_first_non_option(true); + args_parser.add_option(ignore_env, "Start with an empty environment", "ignore-environment", 'i'); args_parser.add_option(split_string, "Process and split S into separate arguments; used to pass multiple arguments on shebang lines", "split-string", 'S', "S"); |