Show More
@@ -2374,9 +2374,17 b' norepo = ("clone init version help debug' | |||
|
2374 | 2374 | " debugindex debugindexdot paths") |
|
2375 | 2375 | |
|
2376 | 2376 | def find(cmd): |
|
2377 | choice = [] | |
|
2377 | 2378 | for e in table.keys(): |
|
2378 | if re.match("(%s)$" % e, cmd): | |
|
2379 | aliases = e.lstrip("^").split("|") | |
|
2380 | if cmd in aliases: | |
|
2379 | 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 | 2389 | raise UnknownCommand(cmd) |
|
2382 | 2390 |
General Comments 0
You need to be logged in to leave comments.
Login now