]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vsh: Don't put VSH_OT_ALIAS onto list of completions
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Feb 2021 13:55:28 +0000 (14:55 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 10 Feb 2021 10:51:59 +0000 (11:51 +0100)
commit58aeebe0965e2653ecd64af2c809a48eef8fed21
tree25fb1080221db4b27aefabb7d8794c6e9a97d6f9
parentd3b2d5158a2d4f47466155829db5fa83392bd4c9
vsh: Don't put VSH_OT_ALIAS onto list of completions

We've invented VSH_OT_ALIAS type for --option so that we can
rewrite some --options (e.g. fix spelling). For instance
blkdeviotune command uses this feature heavily:
--options-with-dash are preferred over old
--options_with_underscore. Both versions are supported but only
the new ones (not aliased) are documented and reported in --help.

Except for options completer, which happily put also aliased
versions in front of user's eyes.

Note, there is a second (gross) way we use aliases: to rewrite
options from --oldoption to --newoption=value (for instance
--shareable option of attach-disk is an alias of
--mode=shareable). And just like with the previous group - don't
generate them into the list of possible options.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
tools/vsh.c