diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-11-11 18:05:39 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-11-11 23:23:58 +0100 |
commit | 914d3e1b1db58731b72be57cde46158720e73cb9 (patch) | |
tree | f16c12dd8d32191cff071582b4650116c217f677 /main | |
parent | 340fb33e543fb5775e36a7d49d605b4e3a33e5d6 (diff) |
Allow `++` as an alternative separator to `--` for user CLI arguments
This is required when using `startx` to start a Godot project, as
`--` is used by `startx` for its own arguments (and there is no way
to escape it).
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 0fce8e3d94..1a9020aade 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -316,7 +316,7 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print("\n"); OS::get_singleton()->print("Run options:\n"); - OS::get_singleton()->print(" -- Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n"); + OS::get_singleton()->print(" --, ++ Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from `OS.get_cmdline_user_args()`.\n"); #ifdef TOOLS_ENABLED OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n"); OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n"); @@ -1286,7 +1286,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph goto error; } - } else if (I->get() == "--") { + } else if (I->get() == "--" || I->get() == "++") { adding_user_args = true; } else { main_args.push_back(I->get()); |