[v2v PATCH] bash: remove extra registrations
The virt-v2v-copy-to-local completion script definitely does not need to register completions for libguestfs-test-tool, and virt-win-reg, as they are libguestfs tools. Also, rename the helper _guestfs_options_only to _v2v_options_only, to avoid potential clashes with the libguestfs completion scripts. --- bash/virt-v2v-copy-to-local | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/bash/virt-v2v-copy-to-local b/bash/virt-v2v-copy-to-local index 8360b0b9..c14bbc47 100644 --- a/bash/virt-v2v-copy-to-local +++ b/bash/virt-v2v-copy-to-local @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -_guestfs_options_only () +_v2v_options_only () { local cur prev words cword split local shortopts longopts tool="$1" @@ -42,18 +42,6 @@ _guestfs_options_only () _virt_v2v_copy_to_local () { - _guestfs_options_only "virt-v2v-copy-to-local" + _v2v_options_only "virt-v2v-copy-to-local" } && complete -o default -F _virt_v2v_copy_to_local virt-v2v-copy-to-local - -_virt_win_reg () -{ - _guestfs_options_only "virt-win-reg" -} && -complete -o default -F _virt_win_reg virt-win-reg - -_libguestfs-test-tool () -{ - _guestfs_options_only "libguestfs-test-tool" -} && -complete -o default -F _libguestfs-test-tool libguestfs-test-tool -- 2.24.1
On Tue, Mar 10, 2020 at 06:28:52PM +0100, Pino Toscano wrote:
The virt-v2v-copy-to-local completion script definitely does not need to register completions for libguestfs-test-tool, and virt-win-reg, as they are libguestfs tools.
Also, rename the helper _guestfs_options_only to _v2v_options_only, to avoid potential clashes with the libguestfs completion scripts. --- bash/virt-v2v-copy-to-local | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/bash/virt-v2v-copy-to-local b/bash/virt-v2v-copy-to-local index 8360b0b9..c14bbc47 100644 --- a/bash/virt-v2v-copy-to-local +++ b/bash/virt-v2v-copy-to-local @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-_guestfs_options_only () +_v2v_options_only () { local cur prev words cword split local shortopts longopts tool="$1" @@ -42,18 +42,6 @@ _guestfs_options_only ()
_virt_v2v_copy_to_local () { - _guestfs_options_only "virt-v2v-copy-to-local" + _v2v_options_only "virt-v2v-copy-to-local" } && complete -o default -F _virt_v2v_copy_to_local virt-v2v-copy-to-local - -_virt_win_reg () -{ - _guestfs_options_only "virt-win-reg" -} && -complete -o default -F _virt_win_reg virt-win-reg - -_libguestfs-test-tool () -{ - _guestfs_options_only "libguestfs-test-tool" -} && -complete -o default -F _libguestfs-test-tool libguestfs-test-tool -- 2.24.1
Yes that was definitely left over. I believe it's actually safe in that bash-completion would have ignored the extra functions, but it's good to remove them. ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (2)
-
Pino Toscano -
Richard W.M. Jones