Created attachment 361493 [details] virsh -h Description of problem: List of commands in virsh help should be listed in alphabetical order - most of the commands are already listed in alphabetical order, but some of them are not (help, start, iface*, secret*, dump and so forth). Version-Release number of selected component (if applicable): libvirt-client-0.7.1-1.fc12.x86_64 How reproducible: always Steps to Reproduce: 1. run virsh -h Actual results: not all listed commands are sorted in alphabetical order (for example command "dump" is between commands "schedinfo" and "shutdown" ) Expected results: all commands listed in alphabetical order
Good point, they're almost alphabetical but not quite Moving this one upstream Might be a nice opportunity to cook up a simple patch :-) Thanks for the report
Fixed by: commit 7829052757953023b0826e0293ffe18ed4ab89e9 Author: Osier Yang <jyang> AuthorDate: 2010-11-30 14:37:04 +0800 Commit: Eric Blake <eblake> CommitDate: 2010-11-30 13:35:32 -0700 virsh: Categorize commands into groups for virsh help Change the virsh help out. The new output of "virsh help" and "virsh --help" will be like: Secret (help keyword 'secret'): secret-define define or modify a secret from an XML file secret-dumpxml secret attributes in XML secret-set-value set a secret value secret-get-value Output a secret value secret-undefine undefine a secret secret-list list secrets Snapshot (help keyword 'snapshot'): snapshot-create Create a snapshot snapshot-current Get the current snapshot snapshot-delete Delete a domain snapshot snapshot-dumpxml Dump XML for a domain snapshot snapshot-list List snapshots for a domain snapshot-revert Revert a domain to a snapshot Also support output help information of specified command group, e.g. % ./tools/virsh help "Network Filter" Network Filter (help keyword 'filter'): nwfilter-define define or update a network filter from an XML file nwfilter-undefine undefine a network filter nwfilter-dumpxml network filter information in XML nwfilter-list list network filters nwfilter-edit edit XML configuration for a network filter Each group has a help keyword, e.g. % ./tools/virsh help filter Network Filter (help keyword 'filter'): nwfilter-define define or update a network filter from an XML file nwfilter-undefine undefine a network filter nwfilter-dumpxml network filter information in XML nwfilter-list list network filters nwfilter-edit edit XML configuration for a network filter * tools/virsh.c: - introduce new struct "vshCmdGrp" and macros to define the groups. - split previous array "commands" into small arrays which are orgnized by group - changed some functions, e.g. "vshCmdDefSearch" - Added new functions, e.g. "vshCmdGrpSearch" - commands of each group are in "alphabetical order" now. - command groups are in "alphabetical order" now. - the commands are categorized with reference of http://wiki.libvirt.org/page/VirshHelpV2 (by Justin) - the modifications doesn't affect tests * TODO: - doc git describe: v0.8.6-2-g7829052 contains: v0.8.7~198