equal
deleted
inserted
replaced
2677 " debugindex debugindexdot paths") |
2677 " debugindex debugindexdot paths") |
2678 |
2678 |
2679 def find(cmd): |
2679 def find(cmd): |
2680 """Return (aliases, command table entry) for command string.""" |
2680 """Return (aliases, command table entry) for command string.""" |
2681 choice = [] |
2681 choice = [] |
|
2682 debugchoice = [] |
2682 for e in table.keys(): |
2683 for e in table.keys(): |
2683 aliases = e.lstrip("^").split("|") |
2684 aliases = e.lstrip("^").split("|") |
2684 if cmd in aliases: |
2685 if cmd in aliases: |
2685 return aliases, table[e] |
2686 return aliases, table[e] |
2686 for a in aliases: |
2687 for a in aliases: |
2687 if a.startswith(cmd): |
2688 if a.startswith(cmd): |
2688 choice.append([aliases, table[e]]) |
2689 if aliases[0].startswith("debug"): |
|
2690 debugchoice.append([aliases, table[e]]) |
|
2691 else: |
|
2692 choice.append([aliases, table[e]]) |
2689 break |
2693 break |
|
2694 |
|
2695 if not choice and debugchoice: |
|
2696 choice = debugchoice |
2690 |
2697 |
2691 if len(choice) > 1: |
2698 if len(choice) > 1: |
2692 clist = [] |
2699 clist = [] |
2693 for aliases, table_e in choice: |
2700 for aliases, table_e in choice: |
2694 if aliases[0].startswith(cmd): |
2701 if aliases[0].startswith(cmd): |