[Libguestfs] [PATCH 3/3] bash: add a completion script for libguestfs-test-tool

Pino Toscano ptoscano at redhat.com
Wed Jun 27 10:44:59 UTC 2018


Use the simple virt-v2v-copy-to-local script for it.
---
 .gitignore                  | 1 +
 bash/Makefile.am            | 3 ++-
 bash/virt-v2v-copy-to-local | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 871795bcc..a78fd1633 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,6 +48,7 @@ Makefile.in
 /AUTHORS
 /autom4te.cache
 /bash/guestunmount
+/bash/libguestfs-test-tool
 /bash/virt-builder
 /bash/virt-cat
 /bash/virt-copy-in
diff --git a/bash/Makefile.am b/bash/Makefile.am
index 129c2972e..9af1550d2 100644
--- a/bash/Makefile.am
+++ b/bash/Makefile.am
@@ -28,6 +28,7 @@ scripts = \
 # Some of the scripts are simply symbolic links.
 symlinks = \
 	guestunmount \
+	libguestfs-test-tool \
 	virt-builder \
 	virt-cat \
 	virt-copy-in \
@@ -65,7 +66,7 @@ CLEANFILES += \
 
 # Any tool that has --short-options and --long-options only is handled
 # by this common script.
-virt-win-reg:
+libguestfs-test-tool virt-win-reg:
 	rm -f $@
 	$(LN_S) virt-v2v-copy-to-local $@
 
diff --git a/bash/virt-v2v-copy-to-local b/bash/virt-v2v-copy-to-local
index bfebcbb20..25500d595 100644
--- a/bash/virt-v2v-copy-to-local
+++ b/bash/virt-v2v-copy-to-local
@@ -51,3 +51,9 @@ _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.17.1




More information about the Libguestfs mailing list