Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for --argument=value syntax in engine command line arguments (in addition to --argument value) #7535

Open
Calinou opened this issue Aug 20, 2023 · 0 comments

Comments

@Calinou
Copy link
Member

Calinou commented Aug 20, 2023

Describe the project you are working on

The Godot editor 🙂

Describe the problem or limitation you are having in your project

Godot's CLI argument parser currently supports --argument value for long arguments, but not --argument=value. In contrast, most command line tools such as git support both syntaxes. This can break user expectations as seen in #6423 (comment).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add support for --argument=value syntax in engine command line arguments. Support for the existing --argument value would remain. Only long arguments like --path should be affected by this change, not short arguments like -p.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Currently, CLI arguments in the engine are implemented like this: https://github.com/godotengine/godot/blob/352434668923978f54f2236f20116fc96ebc9173/main/main.cpp#L1358-L1370

This may have to wait for godotengine/godot#49362 and/or godotengine/godot#44594 considering the current command-line parsing implementation in main/main.cpp is repetitive.

If this enhancement will not be used often, can it be worked around with a few lines of script?

No.

Is there a reason why this should be core and not an add-on in the asset library?

This proposal is relevant for the engine arguments, which can't be modified by scripting. User arguments can already choose to support this syntax. In fact, the minimal example given in the documentation only supports --argument=value syntax, not --argument value.

@Calinou Calinou changed the title Add support for --argument=value syntax in engine command line arguments Add support for --argument=value syntax in engine command line arguments (in addition to --argument value) Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant