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

Unequal handling of the "equal notation" #145

Open
EvgenKo423 opened this issue Sep 21, 2024 · 2 comments
Open

Unequal handling of the "equal notation" #145

EvgenKo423 opened this issue Sep 21, 2024 · 2 comments

Comments

@EvgenKo423
Copy link

EvgenKo423 commented Sep 21, 2024

Environment: Windows 7 SP1. ByeDPI v0.13.1+ at least.
Reproduce Steps:
Examples use --auto=torst, so run proxy with ciadpi.exe -i 127.0.0.1 -A=t -T 1 -s 4.

Expected Result: It works.
Actual Result: invalid value: -A =t

I understand that the "equal notation" is a feature of long-style arguments, but it would be nice to have a universal syntax. Native Windows command line (linked with MSVCRT) always uses both and = as an argument separators (among others).
Also it's somewhat unclear whether the "equal notation" is supported for all long arguments or only for some specific.

@hufrea
Copy link
Owner

hufrea commented Sep 22, 2024

Just always use long options with =, you can't go wrong. This is the getopt syntax, I don't change it.

@EvgenKo423
Copy link
Author

Fortunately, the error is not raised by getopt(), so the solution is quite simple: if (*optarg == '=') optarg++;.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants