diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1214,7 +1214,11 @@ def help_(ui, name=None, with_version=Fa ui.write('\n') aliases, i = cmdutil.findcmd(ui, name, table) # synopsis - ui.write("%s\n\n" % i[2]) + ui.write("%s\n" % i[2]) + + # aliases + if not ui.quiet and len(aliases) > 1: + ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) # description doc = i[0].__doc__ @@ -1222,13 +1226,9 @@ def help_(ui, name=None, with_version=Fa doc = _("(No help text available)") if ui.quiet: doc = doc.splitlines(0)[0] - ui.write("%s\n" % doc.rstrip()) + ui.write("\n%s\n" % doc.rstrip()) if not ui.quiet: - # aliases - if len(aliases) > 1: - ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:])) - # options if i[1]: option_lists.append((_("options:\n"), i[1])) diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -211,6 +211,8 @@ options: use "hg -v help diff" to show global options hg status [OPTION]... [FILE]... +aliases: st + show changed files in the working directory Show status of files in the repository. If names are given, only @@ -235,8 +237,6 @@ show changed files in the working direct I = ignored (not shown by default) = the previous added file was copied from here -aliases: st - options: -A --all show status of all files