Description of problem: libguestfs-bash-completion package contains file /usr/share/bash-completion/completions/virt-log, but no _virt_log() function in that file. This will forbid shell execute 'complete -F _minimal virt-log' in /usr/share/bash-completion/bash_completion and source file /usr/share/bash-completion/completions/virt-log. Because file /usr/share/bash-completion/completions/virt-log have no _virt_log() function, this will lead to virt-log failed to complete its command line. Version-Release number of selected component (if applicable): libguestfs-1.27.62-1.1.el7 How reproducible: 100% Steps to Reproduce: 1. touch test.img 2. #virt-log -a test<TAB> 3. Search _virt_log in file /usr/share/bash-completion/completions/virt-log 4. # set -x #virt-log -a t<TAB> + [[ /usr/share/bash-completion/bash_completion == */* ]] + compfile=/usr/share/bash-completion/completions + compfile+=/virt-log + [[ -f /usr/share/bash-completion/completions/virt-log ]] + . /usr/share/bash-completion/completions/virt-log + return 124 Actual results: #virt-log -a test<TAB> <nothing> At step 3 can not find completion function for virt-log tool Expected results: #virt-edit -a test<TAB> test.img At step 3, there should have completion function for virt-log, such as: _virt_log () { _guestfs_virttools "$(virt-log --long-options)" 1 } && complete -o default -F _virt_log virt-log Additional info:
(In reply to Lingfei Kong from comment #0) > At step 3, there should have completion function for virt-log, such as: > _virt_log () > { > _guestfs_virttools "$(virt-log --long-options)" 1 > } && > complete -o default -F _virt_log virt-log Indeed it was missing, thanks! Fixed upstream with the commit https://github.com/libguestfs/libguestfs/commit/94f2eb8b26cef7faa42eba7c9cbe39d6a25858bd
Verified with libguestfs-tools-c-1.28.1-1.2.el7 # touch test.img # virt-log -a te<TAB> test.img
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://rhn.redhat.com/errata/RHBA-2015-0303.html