On Thu, Jul 09, 2026 at 15:01:00 +0200, Radosław Śmigielski via Devel wrote: > From: Radoslaw Smigielski <[email protected]> > > The '--type' option of 'domdisplay' command selects a particular > graphical display scheme (vnc, spice, rdp, or dbus). > > Partially-fixes: https://gitlab.com/libvirt/libvirt/-/work_items/9 > Signed-off-by: Radoslaw Smigielski <[email protected]> > --- > tools/virsh-completer-domain.c | 13 +++++++++++++ > tools/virsh-completer-domain.h | 5 +++++ > tools/virsh-domain.c | 1 + > 3 files changed, 19 insertions(+) > > diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c > index 8bdf68ac091d..4c0ddb01d855 100644 > --- a/tools/virsh-completer-domain.c > +++ b/tools/virsh-completer-domain.c > @@ -1132,3 +1132,16 @@ virshDomainNetTypeCompleter(vshControl *ctl > G_GNUC_UNUSED, > return vshEnumComplete(VIR_DOMAIN_NET_TYPE_LAST, > virDomainNetTypeToString); > } > + > + > +char ** > +virshDomainDisplayTypeCompleter(vshControl *ctl G_GNUC_UNUSED, > + const vshCmd *cmd G_GNUC_UNUSED, > + unsigned int flags) > +{ > + static const char *types[] = {"vnc", "spice", "rdp", "dbus", NULL};
This duplicates the list of supported types and is missing some that were added meanwhile. Duplicating it means that it will be forgotten in the future too when some new type is added. Use virDomainGraphicsTypeToString adn VIR_DOMAIN_GRAPHICS_TYPE_LAST via the normal enum completer.
