mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Move aliases section in help below synopsis (issue362)
This should avoid confusion why e.g. "hg help co" shows help for "hg update" instead.
This commit is contained in:
parent
2c5d3eddb4
commit
35cbed7baa
@ -1214,7 +1214,11 @@ def help_(ui, name=None, with_version=False):
|
||||
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=False):
|
||||
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]))
|
||||
|
@ -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 directory
|
||||
I = ignored (not shown by default)
|
||||
= the previous added file was copied from here
|
||||
|
||||
aliases: st
|
||||
|
||||
options:
|
||||
|
||||
-A --all show status of all files
|
||||
|
Loading…
Reference in New Issue
Block a user