RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1367738 - Missing bash completion scripts for: virt-diff guestunmount virt-copy-in virt-copy-out virt-customize virt-get-kernel virt-p2v-make-disk virt-p2v-make-kickstart virt-tar-in virt-tar-out virt-v2v-copy-to-local virt-win-reg
Summary: Missing bash completion scripts for: virt-diff guestunmount virt-copy-in virt...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Jiri Herrmann
URL:
Whiteboard:
Depends On: 1359086
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-17 10:56 UTC by Richard W.M. Jones
Modified: 2017-08-01 22:08 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.36.3-1.el7
Doc Type: Release Note
Doc Text:
Tab completion for all *libguestfs* commands Bash completion scripts have been added for all *libguestfs* tools. As a result, it is now possible to use Tab completion in bash with every *libguestfs* command.
Clone Of:
Environment:
Last Closed: 2017-08-01 22:08:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2023 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2017-08-01 19:32:01 UTC

Description Richard W.M. Jones 2016-08-17 10:56:53 UTC
Description of problem:

Bash completion scripts are missing for the tools mentioned
in the summary.

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

libguestfs-bash-completion-1.32.7-1.el7.noarch

How reproducible:

100%

Steps to Reproduce:
1. virt-diff --<tab>

Actual results:

No completions are listed.

Expected results:

It should produce a list of completions.

Comment 2 Richard W.M. Jones 2016-08-25 12:16:09 UTC
I've posted most of the fix for this:

https://www.redhat.com/archives/libguestfs/2016-August/msg00138.html

Comment 3 Richard W.M. Jones 2016-08-25 12:59:15 UTC
The above (mostly-) fix will be upstream in >= 1.34.1.

Comment 5 mxie@redhat.com 2017-03-22 03:03:25 UTC
I can reproduce the bug with build:
libguestfs-bash-completion-1.32.7-3.el7.noarch

Verify the bug with build:
libguestfs-bash-completion-1.36.2-2.el7.noarch
libguestfs-1.36.2-2.el7.x86_64

Steps:
1.Install libguestfs-bash-completion and libguestfs related packages on the test server

2.Verify whether there is bash completion scripts for virt-diff
#virt-diff -<tab>
-a                 -c                 -d                 --dir-nlinks       --extra-stat       --human-readable   --times            -V                 --xattrs           
-A                 --checksum         -D                 --dir-time         --extra-stats      --keys-from-stdin  --time-t           --verbose          
--add              --checksums        --dir-link         --dir-times        --format           --time             --uid              --version          
--all              --connect          --dir-links        --domain           -h                 --time-days        --uids             -x                 
--atime            --csv              --dir-nlink        --echo-keys        --help             --time-relative    -v                 --xattr            

Result:
Can't get the short options and long options by typing tab at first time, but could get the options normaly after typing the tab at second time


3.Verify whether there is bash completion scripts for guestunmount,virt-copy-in,virt-copy-out, virt-customize, virt-get-kernel, virt-p2v-make-disk, virt-p2v-make-kickstart, virt-tar-in and virt-tar-out, get same result with step2


4.Verify whether there is bash completion scripts for virt-v2v-copy-to-local
# virt-v2v-copy-to-local -<tab>
nothing

Result:
Can't get the short options and long options by typing tab for virt-v2v-copy-to-local command

Hi rjones,

Pls help check the results of step2 and step4, and I don't know where could download virt-win-reg rpm pkg

Comment 6 Richard W.M. Jones 2017-03-22 10:31:29 UTC
You probably have to start a new shell/terminal in order to get the
completion scripts (they are loaded by bash when it starts up).

Step 2 looks OK if you get tab completion for those commands.

I notice that we forgot to add tab completion to virt-v2v-copy-to-local
upstream which is why it doesn't work.  I posted a fix for that:

https://www.redhat.com/archives/libguestfs/2017-March/msg00247.html

Comment 7 Richard W.M. Jones 2017-03-22 15:54:10 UTC
Upstream in commit:
2f25d23ac85bbc341459da03da6cfa6d85dae8dc
and in libguestfs >= 1.37.7.

Comment 8 mxie@redhat.com 2017-03-24 08:42:56 UTC
Verify the bug with builds again:
libguestfs-bash-completion-1.36.2-3.el7.noarch
libguestfs-1.36.2-3.el7.x86_64
libguestfs-tools-1.36.2-3.el7.noarch


Steps:
1.Verify whether there is bash completion scripts for virt-v2v-copy-to-local
# virt-v2v-copy-to-local -<tab>
--color          --colours        --ic             --quiet          --verbose        
--colors         --debug-gc       --password-file  -v               --version        
--colour         --help           -q               -V               -x             

Result:
Can get the short options and long options by typing tab two times

2.Verify whether there is bash completion scripts for virt-diff,guestunmount,virt-copy-in,virt-copy-out, virt-customize, virt-get-kernel, virt-p2v-make-disk, virt-p2v-make-kickstart, virt-tar-in and virt-tar-out, get same result with step1

3..Verify whether there is bash completion scripts for virt-win-reg
#virt-win-reg -<tab>
nothing

Result:
Can't get the short options and long options by typing tab for virt-win-reg

Comment 9 Richard W.M. Jones 2017-03-24 09:01:51 UTC
Tab completion added for virt-win-reg too:

https://www.redhat.com/archives/libguestfs/2017-March/msg00277.html

Comment 10 mxie@redhat.com 2017-03-28 08:38:26 UTC
Verify the bug with builds:
libguestfs-1.36.3-1.el7.x86_64
libguestfs-tools-1.36.3-1.el7.noarch
libguestfs-bash-completion-1.36.3-1.el7.noarch


Steps:
1.Verify whether there is bash completion scripts for virt-win-reg
# virt-win-reg -<tab>
-?                          --format
-c                          --help
--connect                   --merge
-d                          --unsafe-printable-strings
--debug                     --version


Result:
Can get the short options and long options for virt-win-reg by typing tab two times

2.Verify whether there is bash completion scripts for virt-diff,guestunmount,virt-copy-in,virt-copy-out, virt-customize, virt-get-kernel, virt-p2v-make-disk, virt-p2v-make-kickstart, virt-tar-in,virt-tar-out and virt-v2v-copy-to-local, get same result with step1

So the bug has been fixed, move the bug from ON_QA to VERIFIED

Comment 11 errata-xmlrpc 2017-08-01 22:08:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2023


Note You need to log in before you can comment on or make changes to this bug.