mercurial/commands.py
changeset 11524 24965bb270b7
parent 11515 cc982ff2dcf8
child 11525 f4eddec324b7
equal deleted inserted replaced
11517:8bbe396883db 11524:24965bb270b7
  1864         # description
  1864         # description
  1865         doc = gettext(entry[0].__doc__)
  1865         doc = gettext(entry[0].__doc__)
  1866         if not doc:
  1866         if not doc:
  1867             doc = _("(no help text available)")
  1867             doc = _("(no help text available)")
  1868         if hasattr(entry[0], 'definition'):  # aliased command
  1868         if hasattr(entry[0], 'definition'):  # aliased command
  1869             doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
  1869             if entry[0].definition.startswith('!'):  # shell alias
       
  1870                 doc = _('shell alias for::\n\n    %s') % entry[0].definition[1:]
       
  1871             else:
       
  1872                 doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc)
  1870         if ui.quiet:
  1873         if ui.quiet:
  1871             doc = doc.splitlines()[0]
  1874             doc = doc.splitlines()[0]
  1872         keep = ui.verbose and ['verbose'] or []
  1875         keep = ui.verbose and ['verbose'] or []
  1873         formatted, pruned = minirst.format(doc, textwidth, keep=keep)
  1876         formatted, pruned = minirst.format(doc, textwidth, keep=keep)
  1874         ui.write("\n%s\n" % formatted)
  1877         ui.write("\n%s\n" % formatted)