[virt-tools-list] [virt-manager] [PATCH 1/2] cli: Replace '_' from cli_arg_name with '-' before saving to parsernames
Lin Ma
lma at suse.com
Mon Dec 24 08:35:00 UTC 2018
The patch makes --qemu-commandline subprops completion works.
Signed-off-by: Lin Ma <lma at suse.com>
---
virtinst/cli.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 21586b19..3ba81861 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -494,7 +494,8 @@ def autocomplete(parser):
import argcomplete
- parsernames = ["--" + pclass.cli_arg_name for pclass in VIRT_PARSERS]
+ parsernames = ["--" + pclass.cli_arg_name.replace("_", "-")
+ for pclass in VIRT_PARSERS]
# pylint: disable=protected-access
for action in parser._actions:
for opt in action.option_strings:
--
2.19.0
More information about the virt-tools-list
mailing list