[libvirt] [PATCH 4/5]virsh: If VSH_OFLAG_IGNORE set, don't auto complete it in virsh

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Fri Oct 18 06:42:41 UTC 2013


From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

If VSH_OFLAG_IGNORE set, don't auto complete in virsh.

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 tools/virsh.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/virsh.c b/tools/virsh.c
index f772794..42d79f1 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -2677,6 +2677,9 @@ vshReadlineOptionsGenerator(const char *text, int state)
             /* ignore non --option */
             continue;
 
+        if (opt->flags & VSH_OFLAG_IGNORE)
+            continue;
+
         if (len > 2) {
             if (STRNEQLEN(name, text + 2, len - 2))
                 continue;
-- 
1.8.2.1




More information about the libvir-list mailing list