Bug 579027

Summary: RFE: virsh: add bash completion
Product: [Community] Virtualization Tools Reporter: karaluh
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, crobinso, eblake, feniksgordonfreeman, jberan, jrhbgz16a, never, remy.garrigue, simonjin, xen-maint, zbyszek
Target Milestone: ---Keywords: RFE
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-06 23:45:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 636082    

Description karaluh 2010-04-02 08:03:55 UTC
Description of problem:
libvirt tools lack bash completion.

Version-Release number of selected component (if applicable):
0.7.5

Comment 1 Simon Jin 2011-06-28 02:39:48 UTC
Would put more info like how libvirt tool lack bash completion ?

Comment 2 karaluh 2011-06-28 06:13:38 UTC
(In reply to comment #1)
> Would put more info like how libvirt tool lack bash completion ?

I don't understand your question.

Comment 3 Maxim Sditanov 2012-03-31 19:02:39 UTC
looks like it is already implemented in virsh

Comment 4 Rémy 2012-07-24 08:47:19 UTC
Virsh does have completion in it's own shell. 

What's lacking is a completion in the common shell. A script in /etc/bash_completion.d/ would do, something like this one I found: https://launchpadlibrarian.net/42921866/virsh.completion
Although it lacks option completion (--all & other)

Comment 5 Eric Blake 2013-10-18 18:20:52 UTC
*** Bug 953360 has been marked as a duplicate of this bug. ***

Comment 6 Eric Blake 2013-10-18 18:21:58 UTC
*** Bug 1021003 has been marked as a duplicate of this bug. ***

Comment 7 Eric Blake 2013-10-18 18:23:59 UTC
Intelligent completion was attempted for a google summer of code project:
https://www.redhat.com/archives/libvir-list/2013-September/msg00512.html

Alas, I haven't seen any motion on that patch series since September, so maybe it's time for someone else to pick up the work?

Comment 8 Cole Robinson 2016-05-20 12:16:17 UTC
*** Bug 1337737 has been marked as a duplicate of this bug. ***

Comment 9 Cole Robinson 2019-02-06 23:45:00 UTC
virsh does have bash completion support nowadays but it will take ongoing work to cover all sub options. Some example docs: https://www.redhat.com/archives/libvir-list/2019-January/msg00766.html