Added support for abbreviated xm sub commands

This commit is contained in:
twilkie@paploo.uk.xensource.com committed 2005-08-11 12:06:32 +00:00
1 parent 0b3823d582
commit 3140b13b50
1 file changed
+4
+4
View File
@@ -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()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.