1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
====================================
Using aliases for Bazaar-NG commands
====================================
Command aliases are an easy way to customize the behaviour of Bazaar-NG. Aliases
are an easy way to create shortcuts for commonly-typed commands, or to set
defaults for commands.
Command aliases can be defined in the **[ALIASES]** section of your
**.bazaar/bazaar.conf** file. Aliases start with the alias name, then an
equal sign, then a command fragment. Here's an example ALIASES section:
Examples
========
A typical example::
[ALIASES]
recentlog=log -r-3..-1
ll=log --line -r-10..-1
commit=commit --strict
diff=diff --diff-options -p
Explanation of examples
=======================
* The first alias makes a new 'recentlog' command that shows the logs for the
last three revisions
* The **ll** alias shows the last 10 log entries in line format.
* the **commit** alias sets the default for commit to refuse to commit if new
files in the tree are not recognized.
* the **diff** alias adds the coveted -p option to diff
Rules for Aliases
=================
* You can override parts of the options given in an alias by overriding it.
For example, if you run **lastlog -r-5..**, you will only get five
line-based log entries instead of 10.
* Aliases can override the standard behaviour of existing commands by giving
an alias name that is thesame as the orignal command. For example, default
commit is changed with **commit=commit --strict**.
* Aliases can not refer to other aliases. In other words making a
**lastlog** alias and referring to it with a **ll** alias will not work.
This includes aliases that override standard commands
* Giving the **--no-aliases** to the bzr command will tell it to ignore aliases
for that run. For example, running **bzr --no-aliases commit** will perform a
standard commit instead not do a **commit --strict**.
|