Mercurial > hg
comparison tests/test-alias @ 11524:24965bb270b7
dispatch: add shell aliases
This patch adds git-style "shell aliases" to Mercurial.
Any alias with a definition beginning with a '!' will be treated as a shell
alias. For example:
[alias]
echo = !echo
qempty = !hg qrefresh -X "`hg root`" ; echo Emptied patch "`hg qtop`"
$ hg echo foo
foo
$ hg qempty
Emptied patch foo
$
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Wed, 07 Jul 2010 18:49:43 -0400 |
parents | 9e250c145c38 |
children | c5e555e064d0 |
comparison
equal
deleted
inserted
replaced
11517:8bbe396883db | 11524:24965bb270b7 |
---|---|
12 lognull = log -r null | 12 lognull = log -r null |
13 shortlog = log --template '{rev} {node|short} | {date|isodate}\n' | 13 shortlog = log --template '{rev} {node|short} | {date|isodate}\n' |
14 dln = lognull --debug | 14 dln = lognull --debug |
15 nousage = rollback | 15 nousage = rollback |
16 put = export -r 0 -o "\$FOO/%R.diff" | 16 put = export -r 0 -o "\$FOO/%R.diff" |
17 echo = !echo | |
17 | 18 |
18 [defaults] | 19 [defaults] |
19 mylog = -q | 20 mylog = -q |
20 lognull = -q | 21 lognull = -q |
21 log = -v | 22 log = -v |
62 hg dln | 63 hg dln |
63 | 64 |
64 echo '% path expanding' | 65 echo '% path expanding' |
65 FOO=`pwd` hg put | 66 FOO=`pwd` hg put |
66 cat 0.diff | 67 cat 0.diff |
68 | |
69 echo '% shell aliases' | |
70 hg echo foo |