mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Added support for abbreviated xm sub commands
This commit is contained in:
1 parent
0b3823d582
commit
3140b13b50
1 file changed
+4
@@ -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()
|
||||
|
||||
|
||||