Differences between revisions 13 and 17 (spanning 4 versions)
Revision 13 as of 2009-08-10 08:00:18
Size: 925
Editor: TillPlewe
Comment:
Revision 17 as of 2010-10-21 22:53:59
Size: 912
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Alias Extension == = Alias Extension =
Line 3: Line 3:
'''This extension is currently being distributed along with Mercurial.''' Define convenient command aliases.
Line 5: Line 5:
''Author: Brendan Cully'' <<TableOfContents>>
Line 7: Line 7:
== Status ==
Line 8: Line 9:
=== Overview === {i} '''This extension has been moved into core Mercurial as of 1.3.'''
Line 10: Line 11:
Just enable the extension, then define your own command aliases in your hgrc.
For example, the configuration below gives you a new {{{llog}}} command.
''Original author: Brendan Cully''
Line 13: Line 13:
=== Configuration ===
Configure your .hgrc to enable the extension by adding the following lines:
== Overview ==
Line 16: Line 15:
{{{
[extensions]
alias =
Define your own shortcuts for Mercurial's command-line user interface.
Line 20: Line 17:
[alias]
# short log
llog = log --limit 10
}}}
== Configuration ==
Line 25: Line 19:
Starting with version 1.3 it suffices to add: Add the following lines to a hgrc to add a llog command:
Line 33: Line 27:
=== Future Work === (In 1.2.1 and earlier, you also need to activate the extension from the {{{[extensions]}}} section.)

== Ideas for improvements ==
Line 49: Line 45:
Line 50: Line 47:
CategoryExtension CategoryBundledExtension CategoryHistorical

Alias Extension

Define convenient command aliases.

1. Status

{i} This extension has been moved into core Mercurial as of 1.3.

Original author: Brendan Cully

2. Overview

Define your own shortcuts for Mercurial's command-line user interface.

3. 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.)

4. 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


CategoryBundledExtension CategoryHistorical

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