~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: Alexander Belchenko
  • Date: 2006-12-19 08:26:36 UTC
  • mfrom: (2198 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2204.
  • Revision ID: bialix@ukr.net-20061219082636-xbb55np3wnamva8t
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
                                 plugin_command_names,
132
132
                                 get_cmd_object)
133
133
    out = []
134
 
 
 
134
    if topic == 'hidden-commands':
 
135
        hidden = True
 
136
    else:
 
137
        hidden = False
135
138
    names = set(builtin_command_names()) # to eliminate duplicates
136
139
    names.update(plugin_command_names())
137
140
    commands = ((n, get_cmd_object(n)) for n in names)
138
 
    shown_commands = [(n, o) for n, o in commands if not o.hidden]
 
141
    shown_commands = [(n, o) for n, o in commands if o.hidden == hidden]
139
142
    max_name = max(len(n) for n, o in shown_commands)
140
143
    indent = ' ' * (max_name + 1)
141
144
    width = osutils.terminal_width() - 1
163
166
help_topics.topic_registry.register("commands",
164
167
                                    _help_commands_to_text,
165
168
                                    "Basic help for all commands")
 
169
help_topics.topic_registry.register("hidden-commands", 
 
170
                                    _help_commands_to_text,
 
171
                                    "All hidden commands")