~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/help.py

  • Committer: Daniel Watkins
  • Date: 2007-08-22 20:16:39 UTC
  • mto: (2762.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2763.
  • Revision ID: d.m.watkins@warwick.ac.uk-20070822201639-3vctobvxabypk83s
If an alias exists, it is displayed regardless of help also to be displayed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        outfile = sys.stdout
41
41
 
42
42
    indices = HelpIndices()
 
43
 
 
44
    alias = _mod_commands.get_alias(topic)
43
45
    try:
44
46
        topics = indices.search(topic)
45
47
        shadowed_terms = []
46
48
        for index, topic in topics[1:]:
47
49
            shadowed_terms.append('%s%s' % (index.prefix, topic.get_help_topic()))
48
50
        outfile.write(topics[0][1].get_help_text(shadowed_terms))
 
51
        if alias:
 
52
            outfile.write("'bzr %s' is an alias for 'bzr %s'.\n" % (topic, " ".join(alias)))
49
53
    except errors.NoHelpTopic:
50
 
        alias = _mod_commands.get_alias(topic)
51
54
        if alias:
52
55
            outfile.write("'bzr %s' is an alias for 'bzr %s'.\n" % (topic, " ".join(alias)))
53
56
        else: