Show More
@@ -1866,7 +1866,10 b' def help_(ui, name=None, with_version=Fa' | |||
|
1866 | 1866 | if not doc: |
|
1867 | 1867 | doc = _("(no help text available)") |
|
1868 | 1868 | if hasattr(entry[0], 'definition'): # aliased command |
|
1869 | doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) | |
|
1869 | if entry[0].definition.startswith('!'): # shell alias | |
|
1870 | doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] | |
|
1871 | else: | |
|
1872 | doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) | |
|
1870 | 1873 | if ui.quiet: |
|
1871 | 1874 | doc = doc.splitlines()[0] |
|
1872 | 1875 | keep = ui.verbose and ['verbose'] or [] |
@@ -208,6 +208,13 b' class cmdalias(object):' | |||
|
208 | 208 | |
|
209 | 209 | return |
|
210 | 210 | |
|
211 | if self.definition.startswith('!'): | |
|
212 | def fn(ui, *args): | |
|
213 | cmd = '%s %s' % (self.definition[1:], ' '.join(args)) | |
|
214 | return util.system(cmd) | |
|
215 | self.fn = fn | |
|
216 | return | |
|
217 | ||
|
211 | 218 | args = shlex.split(self.definition) |
|
212 | 219 | cmd = args.pop(0) |
|
213 | 220 | args = map(util.expandpath, args) |
@@ -14,6 +14,7 b" shortlog = log --template '{rev} {node|s" | |||
|
14 | 14 | dln = lognull --debug |
|
15 | 15 | nousage = rollback |
|
16 | 16 | put = export -r 0 -o "\$FOO/%R.diff" |
|
17 | echo = !echo | |
|
17 | 18 | |
|
18 | 19 | [defaults] |
|
19 | 20 | mylog = -q |
@@ -64,3 +65,6 b' hg dln' | |||
|
64 | 65 | echo '% path expanding' |
|
65 | 66 | FOO=`pwd` hg put |
|
66 | 67 | cat 0.diff |
|
68 | ||
|
69 | echo '% shell aliases' | |
|
70 | hg echo foo |
General Comments 0
You need to be logged in to leave comments.
Login now