Is this a feature request or a bug?
bug
What is the current behavior?
The --filename cli option is currently defined as a global option, but the build command is the only one expecting it.
It doesn't make a big difference from a CLI usage perspective, but having it defined as a global option affects its format in the config file, and that may be surprising from a user perspective (e.g. see #2171).
What is the expected or desired behavior?
Move the --filename cli option definition into the build-specific options.
⚠️ This would be a backward incompatible change (from a config file format perspective) and so it would be better to do it as part of a major release and/or include a backward compatible behavior (e.g. warn but still load a config file with a filename global option).
Is this a feature request or a bug?
bug
What is the current behavior?
The --filename cli option is currently defined as a global option, but the build command is the only one expecting it.
It doesn't make a big difference from a CLI usage perspective, but having it defined as a global option affects its format in the config file, and that may be surprising from a user perspective (e.g. see #2171).
What is the expected or desired behavior?
Move the --filename cli option definition into the build-specific options.