Size: 508
Comment: alias is now bundled with Mercurial
|
Size: 949
Comment: Emphasize being part of Mercurial after 1.3.
|
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 distributed with Mercurial.''' | '''This extension is currently being distributed along with Mercurial.''' |
Line 7: | Line 7: |
Line 10: | Line 9: |
Just enable the extension, then define your own command aliases in your hgrc. For example, the configuration below gives you a new {{{llog}}} command. |
/!\ In Mercurial 1.3 and newer, this is no longer an extension; the functionality (same as before) is now available from core Mercurial. Define your own shortcuts for Mercurial's command-line user interface. |
Line 14: | Line 14: |
Configure your .hgrc to enable the extension by adding following lines: | Add the following lines to a hgrc to add a llog command: |
Line 17: | Line 18: |
[extensions] alias = /path/to/alias.py |
|
Line 25: | Line 23: |
(In 1.2.1 and earlier, you also need to activate the extension from the {{{[extensions]}}} section.) === Ideas for improvements === * 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
In Mercurial 1.3 and newer, this is no longer an extension; the functionality (same as before) is now available from core Mercurial.
Define your own shortcuts for Mercurial's command-line user interface.
2. Configuration
Add the following lines to a hgrc to add a llog command:
[alias] # short log llog = log --limit 10
(In 1.2.1 and earlier, you also need to activate the extension from the [extensions] section.)
3. Ideas for improvements
- 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