hg help configs says: """ An alias can start with an exclamation point ("!") to make it a shell alias. A shell alias is executed with the shell and will let you run arbitrary commands. As an example, echo = !echo will let you do "hg echo foo" to have "foo" printed in your terminal. """ But that's not really true: $ "$TESTDIR/hghave" system-sh || exit 80 $ cat >> $HGRCPATH <<EOF > [alias] > echo = !echo > EOF $ hg init repo $ cd repo $ hg echo a b c BTW, test-alias.t defines the alias as: echo = !echo '\$@' Unlike what the documentation suggests, the argument handling of regular and shell aliases differ in dispatch.cmdalias.__init__(). I feel the documentation should be fixed rather than the code but I do not know the original intent. (The following bit is also incorrect for shell aliases: """ Positional arguments not already used by "$N" in the definition are put at the end of the command to be executed. """ )
http://selenic.com/pipermail/mercurial-devel/2012-April/039469.html
Fixed by http://selenic.com/repo/hg/rev/aa252059a98f Patrick Mezard <patrick@mezard.eu> alias: fix shell alias documentation (issue3374) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:30 EDT --- This bug was previously known as _bug_ 3374 at http://mercurial.selenic.com/bts/issue3374 Bug Status was UNCONFIRMED but everconfirmed was true Setting status to CONFIRMED