##// END OF EJS Templates
if unambigious command name are passed, use them
Benoit Boissinot -
r1506:11c8b81f default
parent child Browse files
Show More
@@ -2374,9 +2374,17 b' norepo = ("clone init version help debug'
2374 " debugindex debugindexdot paths")
2374 " debugindex debugindexdot paths")
2375
2375
2376 def find(cmd):
2376 def find(cmd):
2377 choice = []
2377 for e in table.keys():
2378 for e in table.keys():
2378 if re.match("(%s)$" % e, cmd):
2379 aliases = e.lstrip("^").split("|")
2380 if cmd in aliases:
2379 return e, table[e]
2381 return e, table[e]
2382 for a in aliases:
2383 if a.startswith(cmd):
2384 choice.append(e)
2385 if len(choice) == 1:
2386 e = choice[0]
2387 return e, table[e]
2380
2388
2381 raise UnknownCommand(cmd)
2389 raise UnknownCommand(cmd)
2382
2390
General Comments 0
You need to be logged in to leave comments. Login now