
On Wed, Oct 05, 2011 at 02:33:44PM -0600, Eric Blake wrote:
On 10/05/2011 02:17 PM, Serge E. Hallyn wrote:
Hi,
I've been trying out a bash autocompletion file by Geoff Low (slight hack by me, don't blame him for my hack), and it's working pretty nicely. I'm not sure where to put it in the git tree, but it seems like it'd be nice to have upstream?
What I'd rather have upstream is:
virsh completion args...
which outputs one string per line of valid completions given the context of args. Then we could leverage a single completion code both from bash and from the virsh interactive shell; also, you'd only have to write the bash completion routines once (figure out how to make it call into 'virsh completion'), rather than chasing a moving target (update the bash completion every time new virsh commands and flags are added).
The patch I wrote tried todo something similar to that, adding a bunch of hidden '_complete-XXX' commands. https://www.redhat.com/archives/libvir-list/2008-July/msg00175.html it was still a little bit too manual for my liking though. It'd be nice if we could do a completion command that is properly metadata driven from the command arg type data Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|