diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index c1779d33a2..cbdbb1c0e8 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -605,6 +605,10 @@ def xm_lookup_cmd(cmd): deprecated(cmd,aliases[cmd]) return commands[aliases[cmd]] else: + if len( cmd ) > 1: + matched_commands = filter( lambda (command, func): command[ 0:len(cmd) ] == cmd, commands.iteritems() ) + if len( matched_commands ) == 1: + return matched_commands[0][1] err('Sub Command %s not found!' % cmd) usage()