[PATCH 0/4] Virsh: Extend command arguments completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patchset extends arguments completion for virsh commands. Currently only
for domain related (start, destroy, etc.) and 'help'. But if community is
satisfied with this little part I'll write follow up patches for other commands
as well.

This means that for command start not only pre-defined options will be generated
(autodestroy, console, paused) but names of inactive domains too. However, this
requires virsh to be already connected to daemon. Completers for commands can be
easily defined as they follow readline logic. Basically, completer returns on
each call one string (=possible argument/option) and it's called repeatedly
until NULL is returned. To generate only corresponding values for given prefix,
there is @text variable in function prototype. There is also @state variable
that is set to zero on the 1st call and to non-zero on any subsequent calls,
so completer can set it internal structures.

Michal Privoznik (4):
  virsh: make conn global
  virsh: Extend virsh commands definition with completer
  virsh: Create completer for commands related to domains
  virsh: Create completer for help command

 tools/virsh.c | 1108 ++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 660 insertions(+), 448 deletions(-)

-- 
1.7.5.rc3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]