A better error message when the user tries to use = with a short option.

See #8556
This commit is contained in:
Kovid Goyal 2025-04-22 07:31:34 +05:30
parent cb490da948
commit 25ae75ac13
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -409,6 +409,7 @@ handle_option_value:
char buf[2] = {0};
for (int i = 1; arg[i] != 0; i++) {
switch(arg[i]) {
case '=': fprintf(stderr, "= is not allowed in short options, only long options. -d=xyz is illegal, --directory=xyz is legal. Use -d xyz instead.\n"); exit(1); break;
case 'v': opts.version_requested = true; break;
case '1': opts.single_instance = true; break;
default: