~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: Jonathan Lange
  • Date: 2009-06-26 08:46:52 UTC
  • mto: (4484.1.1 bring-1.16.1-back)
  • mto: This revision was merged to the branch mainline in revision 4485.
  • Revision ID: jml@canonical.com-20090626084652-x7wn8yimd3fj0j0y
Tweak NEWS slightly based on mbp's feedback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        hidden = True
74
74
    else:
75
75
        hidden = False
76
 
    names = list(_mod_commands.all_command_names())
 
76
    names = set(_mod_commands.builtin_command_names()) # to eliminate duplicates
 
77
    names.update(_mod_commands.plugin_command_names())
77
78
    commands = ((n, _mod_commands.get_cmd_object(n)) for n in names)
78
79
    shown_commands = [(n, o) for n, o in commands if o.hidden == hidden]
79
80
    max_name = max(len(n) for n, o in shown_commands)
93
94
        else:
94
95
            firstline = ''
95
96
        helpstring = '%-*s %s%s' % (max_name, cmd_name, firstline, plugin_name)
96
 
        lines = textwrap.wrap(
97
 
            helpstring, subsequent_indent=indent,
98
 
            width=width,
99
 
            break_long_words=False)
 
97
        lines = textwrap.wrap(helpstring, subsequent_indent=indent,
 
98
                              width=width)
100
99
        for line in lines:
101
100
            out.append(line + '\n')
102
101
    return ''.join(out)