On 03/23/2016 04:57 PM, Mohsen Pahlevanzadeh wrote:
Dear All,
I downloaded the attachment file and activate for bash_complete, It can give you
the following output:
# virsh net-
net-autostart net-dhcp-leases net-info net-undefine
net-create net-dumpxml net-list net-update
net-define net-edit net-name net-uuid
net-destroy net-event net-start
Thanks; but that's fragile. You have to constantly maintain the bash
script to keep up with additions to virsh.
Much better would be adding a 'virsh complete' command, which takes the
remaining command line arguments, and provides the context-sensitive
completion list that best fits what the rest of the command line would
be looking for if done in isolation. Then the bash completion wrapper
would merely forward the current command line to 'virsh complete', and
you'd only ever have to write the bash wrapper once, rather than
maintaining it through each virsh addition.
At one point, a student attempted work on this for Google Summer of Code
(I think 2014?), but didn't get anywhere. It is still a GREAT idea, if
someone wants to tackle it.
Yes, I believe.It can report as feature request.