Show More
@@ -2848,6 +2848,19 b' def help_(ui, name=None, unknowncmd=Fals' | |||||
2848 | if not ui.quiet: |
|
2848 | if not ui.quiet: | |
2849 | addglobalopts(True) |
|
2849 | addglobalopts(True) | |
2850 |
|
2850 | |||
|
2851 | if not name: | |||
|
2852 | text = help.listexts(_('enabled extensions:'), extensions.enabled()) | |||
|
2853 | if text: | |||
|
2854 | ui.write("\n%s" % minirst.format(text, textwidth)) | |||
|
2855 | ||||
|
2856 | ui.write(_("\nadditional help topics:\n\n")) | |||
|
2857 | topics = [] | |||
|
2858 | for names, header, doc in help.helptable: | |||
|
2859 | topics.append((sorted(names, key=len, reverse=True)[0], header)) | |||
|
2860 | topics_len = max([len(s[0]) for s in topics]) | |||
|
2861 | for t, desc in topics: | |||
|
2862 | ui.write(" %-*s %s\n" % (topics_len, t, desc)) | |||
|
2863 | ||||
2851 | def helptopic(name): |
|
2864 | def helptopic(name): | |
2852 | for names, header, doc in help.helptable: |
|
2865 | for names, header, doc in help.helptable: | |
2853 | if name in names: |
|
2866 | if name in names: | |
@@ -2943,19 +2956,6 b' def help_(ui, name=None, unknowncmd=Fals' | |||||
2943 | header = _('list of commands:\n\n') |
|
2956 | header = _('list of commands:\n\n') | |
2944 |
|
2957 | |||
2945 | helplist(header) |
|
2958 | helplist(header) | |
2946 | if name != 'shortlist': |
|
|||
2947 | text = help.listexts(_('enabled extensions:'), extensions.enabled()) |
|
|||
2948 | if text: |
|
|||
2949 | ui.write("\n%s" % minirst.format(text, textwidth)) |
|
|||
2950 |
|
||||
2951 | if not name: |
|
|||
2952 | ui.write(_("\nadditional help topics:\n\n")) |
|
|||
2953 | topics = [] |
|
|||
2954 | for names, header, doc in help.helptable: |
|
|||
2955 | topics.append((sorted(names, key=len, reverse=True)[0], header)) |
|
|||
2956 | topics_len = max([len(s[0]) for s in topics]) |
|
|||
2957 | for t, desc in topics: |
|
|||
2958 | ui.write(" %-*s %s\n" % (topics_len, t, desc)) |
|
|||
2959 |
|
2959 | |||
2960 | ui.write(opttext(optlist, textwidth)) |
|
2960 | ui.write(opttext(optlist, textwidth)) | |
2961 |
|
2961 |
General Comments 0
You need to be logged in to leave comments.
Login now