Mercurial > hg
changeset 844:5a717cfa7406
'hg help -v' mentions the alias of the commands
author | kreijack@inwind.REMOVEME.it |
---|---|
date | Sat, 06 Aug 2005 13:27:31 +0100 |
parents | 859e7ea530bd |
children | 52576cf969f2 |
files | mercurial/commands.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Aug 06 13:27:31 2005 +0100 +++ b/mercurial/commands.py Sat Aug 06 13:27:31 2005 +0100 @@ -333,6 +333,7 @@ ui.write('basic hg commands (use "hg help -v" for more):\n\n') h = {} + cmds = {} for c, e in table.items(): f = c.split("|")[0] if not ui.verbose and not f.startswith("^"): @@ -344,12 +345,17 @@ if e[0].__doc__: d = e[0].__doc__.splitlines(0)[0].rstrip() h[f] = d + cmds[f]=c.lstrip("^") fns = h.keys() fns.sort() m = max(map(len, fns)) for f in fns: - ui.write(' %-*s %s\n' % (m, f, h[f])) + if ui.verbose: + commands = cmds[f].replace("|",", ") + ui.write(" %s:\n %s\n"%(commands,h[f])) + else: + ui.write(' %-*s %s\n' % (m, f, h[f])) # Commands start here, listed alphabetically