diff --git a/virt-clone b/virt-clone index 2b145709..5ccef937 100755 --- a/virt-clone +++ b/virt-clone @@ -134,7 +134,10 @@ def get_force_target(target, design): def parse_args(): - parser = cli.setupParser() + parser = cli.setupParser( + "%prog --original [NAME] ...", + _("Duplicate a virtual machine, changing all unique configuration " + "like MAC address, name, etc. The VM contents are not altered.")) cli.add_connect_option(parser) geng = OptionGroup(parser, _("General Options")) diff --git a/virt-convert b/virt-convert index 1374a146..d80d29d0 100755 --- a/virt-convert +++ b/virt-convert @@ -43,8 +43,10 @@ def get_default_arch(): def parse_args(): """Parse and verify command line.""" - usage = "%prog [options] inputdir|input.vmx [outputdir|output.xml]" - opts = cli.setupParser(usage) + opts = cli.setupParser( + "%prog [options] inputdir|input.vmx [outputdir|output.xml]", + _("Convert from virtual machine descriptor format to another. The " + "VM contents are not altered.")) cong = OptionGroup(opts, "Conversion Options") cong.add_option("-i", "--input-format", dest="input_format", diff --git a/virt-image b/virt-image index 824ae963..1f909fe9 100755 --- a/virt-image +++ b/virt-image @@ -54,8 +54,9 @@ def get_graphics(image, guest, options): def parse_args(): - usage = "%prog [options] image.xml" - parser = cli.setupParser(usage) + parser = cli.setupParser( + "%prog image.xml [OPTIONS]", + _("Create a virtual machine from a virt-image(5) image descriptor.")) cli.add_connect_option(parser) geng = OptionGroup(parser, _("General Options")) diff --git a/virt-install b/virt-install index 6e1bad2e..d4a48fb9 100755 --- a/virt-install +++ b/virt-install @@ -845,8 +845,9 @@ def xml_to_print(guest, continue_inst, xmlonly, xmlstep, dry): ####################### def parse_args(): - usage = "%prog --name NAME --ram RAM STORAGE INSTALL [options]" - parser = cli.setupParser(usage) + parser = cli.setupParser( + "%prog --name NAME --ram RAM STORAGE INSTALL [options]", + _("Create a new virtual machine from specified install media.")) cli.add_connect_option(parser) geng = optparse.OptionGroup(parser, _("General Options")) diff --git a/virtinst/cli.py b/virtinst/cli.py index f3e1f1e3..503286e9 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -140,12 +140,15 @@ class VirtHelpFormatter(optparse.IndentedHelpFormatter): return ret -def setupParser(usage=None): +def setupParser(usage, description): parse_class = VirtOptionParser - parser = parse_class(usage=usage, + parser = parse_class(usage=usage, description=description, formatter=VirtHelpFormatter(), version=cliconfig.__version__) + + parser.epilog = _("See man page for examples and full option syntax.") + return parser