[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XM] Fix 'xm help' when called on a command-name prefix.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID efb8b20004b751330a80d6dc21c7199566802e66
# Parent  bf0deb09facd847db87ab59ed377db6eb0f5a3ad
[XM] Fix 'xm help' when called on a command-name prefix.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r bf0deb09facd -r efb8b20004b7 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Oct 05 16:14:50 2006 +0100
+++ b/tools/python/xen/xm/main.py       Thu Oct 05 16:17:06 2006 +0100
@@ -290,6 +290,11 @@ all_commands = (domain_commands + host_c
 
 def cmdHelp(cmd):
     """Print help for a specific subcommand."""
+    
+    for fc in SUBCOMMAND_HELP.keys():
+        if fc[:len(cmd)] == cmd:
+            cmd = fc
+            break
     
     try:
         args, desc = SUBCOMMAND_HELP[cmd]

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.