~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-08 14:37:25 UTC
  • mfrom: (4516 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4517.
  • Revision ID: john@arbash-meinel.com-20090708143725-sc9sjy3mz4cxwxzz
Merge bzr.dev 4516

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