Mercurial > public > mercurial-scm > hg-stable
diff mercurial/help.py @ 40295:fa88170c10bb
help: adding a proper declaration for shortlist/basic commands (API)
We previously used the '^' prefix to indicate that a command
should be shown on the short list (shown for just "hg"), but
that's a horrible hack, so I'm removing it.
Differential Revision: https://phab.mercurial-scm.org/D5069
author | Rodrigo Damazio <rdamazio@google.com> |
---|---|
date | Fri, 12 Oct 2018 18:49:11 +0200 |
parents | fabbf9310025 |
children | e928bedf0919 ab09e797fbed |
line wrap: on
line diff
--- a/mercurial/help.py Fri Oct 12 18:06:32 2018 +0200 +++ b/mercurial/help.py Fri Oct 12 18:49:11 2018 +0200 @@ -516,16 +516,14 @@ f = fs[0] syns[f] = ', '.join(fs) func = e[0] - p = '' - if c.startswith("^"): - p = '^' - if select and not select(p + f): + if select and not select(f): continue if (not select and name != 'shortlist' and func.__module__ != commands.__name__): continue - if name == "shortlist" and not p: - continue + if name == "shortlist": + if not getattr(func, 'helpbasic', False): + continue doc = pycompat.getdoc(func) if filtercmd(ui, f, name, doc): continue