diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -143,6 +143,8 @@ def topicmatch(ui, kw): cmddoc = gettext(entry[0].__doc__).splitlines()[0] else: cmddoc = _('(no help text available)') + if filtercmd(ui, cmdname, kw, cmddoc): + continue results['extensioncommands'].append((cmdname, cmddoc)) return results diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -1213,7 +1213,7 @@ Test -e / -c / -k combinations Commands: $ hg help -e|egrep '^[A-Z].*:|^ debug' Extensions: - $ hg help -k|egrep '^[A-Z].*:' + $ hg help -k|egrep '^[A-Z].*:|^ debug' Topics: Commands: Extensions: