Differences between revisions 16 and 18 (spanning 2 versions)
Revision 16 as of 2010-08-28 15:02:48
Size: 956
Editor: abuehl
Comment:
Revision 18 as of 2013-08-08 00:05:19
Size: 939
Editor: rcl
Comment: update style
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Alias Extension == #pragma section-numbers 2
= Alias Extension =

Define convenient command aliases.

<<TableOfContents>>

== Status ==
Line 4: Line 11:
Line 6: Line 14:
=== Overview ===

/!\ In Mercurial 1.3 and newer, this is no longer an extension; the functionality (same as before) is now available from core Mercurial.
== Overview ==
Line 12: Line 18:
=== Configuration === == Configuration ==
Line 14: Line 20:
Add the following lines to a hgrc to add a llog command: Add the following lines to a hgrc to add a `llog` command:
Line 24: Line 30:
=== Ideas for improvements ===
 * Support for global options like --config in extension definitions
== Ideas for improvements ==
 * Support for global options like `--config` in extension definitions
Line 40: Line 46:
Line 41: Line 48:
CategoryBundledExtension CategoryBundledExtension CategoryHistorical

Alias Extension

Define convenient command aliases.

1. Status

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)