equal
deleted
inserted
replaced
2687 if a.startswith(cmd): |
2687 if a.startswith(cmd): |
2688 choice.append([aliases, table[e]]) |
2688 choice.append([aliases, table[e]]) |
2689 break |
2689 break |
2690 |
2690 |
2691 if len(choice) > 1: |
2691 if len(choice) > 1: |
2692 clist = [x[0][0] for x in choice] |
2692 clist = [] |
|
2693 for aliases, table_e in choice: |
|
2694 if aliases[0].startswith(cmd): |
|
2695 clist.append(aliases[0]) |
|
2696 for a in aliases[1:]: |
|
2697 if a.startswith(cmd) and not aliases[0].startswith(a): |
|
2698 clist.append(a) |
|
2699 clist.sort() |
2693 raise AmbiguousCommand(cmd, clist) |
2700 raise AmbiguousCommand(cmd, clist) |
2694 |
2701 |
2695 if choice: |
2702 if choice: |
2696 return choice[0] |
2703 return choice[0] |
2697 |
2704 |