Differences between revisions 4 and 11 (spanning 7 versions)
Revision 4 as of 2007-07-02 16:27:09
Size: 718
Editor: BrendanCully
Comment: add zzalias hack
Revision 11 as of 2009-05-19 06:48:12
Size: 815
Editor: BrendanCully
Comment: alias TODO
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Extension Name == == Alias Extension ==
Line 3: Line 3:
'''This extension is not distributed with Mercurial.''' '''This extension is currently being distributed along with Mercurial.'''
Line 7: Line 7:
Download site: [http://hg.kublai.com/mercurial/extensions/alias]
Line 19: Line 18:
alias = /path/to/alias
# if you want to alias commands provided by other extensions,
# alias must load after them. Use this instead:
# zzalias = /path/to/alias.py
alias =
Line 29: Line 25:
=== Future Work ===
 * Support for global options like --config in extension definitions
 * Shell aliases
 * Argument substitution
 {{{
mq = hg -R $(hg root)/.hg/patches $*
}}}
 * Pipes
 {{{
hgrep = hg manifest | grep $*
}}}
 * Recursive alias definitions:
 {{{
foo = bar
bar = log
}}}

Alias Extension

This extension is currently being distributed along with Mercurial.

Author: Brendan Cully

1. Overview

Just enable the extension, then define your own command aliases in your hgrc. For example, the configuration below gives you a new llog command.

2. Configuration

Configure your .hgrc to enable the extension by adding following lines:

[extensions]
alias =

[alias]
# short log
llog = log --limit 10

3. Future Work

  • Support for global options like --config in extension definitions
  • Shell aliases
  • Argument substitution
    mq = hg -R $(hg root)/.hg/patches $*
  • Pipes
    hgrep = hg manifest | grep $*
  • Recursive alias definitions:
    foo = bar
    bar = log


CategoryExtension

AliasExtension (last edited 2013-08-08 00:05:19 by rcl)