curl: make --silent work stand-alone

- renamed the struct field to 'silent' to match the cmdline option
- make --show-error toggle independently of --silent
- make --silent independent of ->noprogress as well

By doing this, the three options --silent, --no-progress-meter and
--show-error should work independently of each other and also work with
and without '--no-' prefix as documented.

Reported-by: u20221022 on github
Fixes #10535
Closes #10536
This commit is contained in:
Daniel Stenberg 2023-02-16 16:34:36 +01:00
parent 6d860f1758
commit 6841f2ed5f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 26 additions and 34 deletions

View file

@ -155,7 +155,7 @@ static CURLcode main_init(struct GlobalConfig *config)
#endif
/* Initialise the global config */
config->showerror = -1; /* Will show errors */
config->showerror = FALSE; /* show errors when silent */
config->errors = stderr; /* Default errors to stderr */
config->styled_output = TRUE; /* enable detection */
config->parallel_max = PARALLEL_DEFAULT;