Daniel P. Berrangé <berra...@redhat.com> writes: > On Wed, Sep 07, 2022 at 05:06:36PM +0200, Markus Armbruster wrote: >> Claudio Fontana <cfont...@suse.de> writes: >> >> > add a simple help option for -audiodev, so users can do >> > >> > qemu -audiodev ? >> >> The preferred form is actually '-audiodev help'. The other one is >> deprecated. Recommend to stay away from it even in commit messages. > > We introduced 'help' many many years ago, but don't thing we > ever formally deprecated '?'.
is_help_option()'s function comment says "'?' is deprecated". Goes back to commit c8057f951d64de93bfd01569c0a725baa9f94372 Author: Peter Maydell <peter.mayd...@linaro.org> Date: Thu Aug 2 13:45:54 2012 +0100 Support 'help' as a synonym for '?' in command line options For command line options which permit '?' meaning 'please list the permitted values', add support for 'help' as a synonym, by abstracting the check out into a helper function. This change means that in some cases where we were being lazy in our string parsing, "?junk" will now be rejected as an invalid option rather than being (undocumentedly) treated the same way as "?". Update the documentation to use 'help' rather than '?', since '?' is a shell metacharacter and thus prone to fail confusingly if there is a single character filename in the current working directory and the '?' has not been escaped. It's therefore better to steer users towards 'help', though '?' is retained for backwards compatibility. We do not, however, update the output of the system emulator's -help (or any documentation autogenerated from the qemu-options.hx which is the source of the -help text) because libvirt parses our -help output and will break. At a later date when QEMU provides a better interface so libvirt can avoid having to do this, we can update the -help text too. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> The more formal deprecation process we use today didn't exist in 2012. Looks like we simply de-documented '?'. Note that output of -help has been updated since. > Should we do so and aim to > remove it, or are we happy to keep '?' forever, despite it > tripping up shell filename expansion with single char filenames. I'm not sure a belated formal notice of deprecation would be useful. Emitting a warning might be. Would have to be done at roughly 20 call sites, I guess. I'm cool with removing a feature that has been undocumented for a decade. However, experience tells us that every feature on the chopping block will find a champion, and I believe this one is still around simply because it's not worth a fight. [...]