diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -635,8 +635,7 @@ def _checkshellalias(lui, ui, args): cmd = args[0] try: - aliases, entry = cmdutil.findcmd(cmd, cmdtable, - lui.configbool("ui", "strict")) + aliases, entry = cmdutil.findcmd(cmd, cmdtable) except (error.AmbiguousCommand, error.UnknownCommand): restorecommands() return diff --git a/tests/test-alias.t b/tests/test-alias.t --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -324,6 +324,21 @@ shell aliases with escaped $ chars $ hg escaped4 test $0 $@ +abbreviated name, which matches against both shell alias and the +command provided extension, should be aborted. + + $ cat >> .hg/hgrc < [extensions] + > hgext.rebase = + > [alias] + > rebate = !echo this is rebate + > EOF + $ hg reba + hg: command 'reba' is ambiguous: + rebase rebate + [255] + $ hg rebat + this is rebate invalid arguments