summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPeter Feigl <craven@gmx.net>2014-02-25 22:50:20 +0100
committerPeter Feigl <craven@gmx.net>2014-02-25 22:50:20 +0100
commitc80b4955467a38a2be3aaaa60c9f49b33edef774 (patch)
treef83e871677be813384f68563d4da8bf83134a1a5 /doc
parentbc08eed3cb1bdb4f67d1b77273f3254d0cf13be2 (diff)
downloadfork-ledger-c80b4955467a38a2be3aaaa60c9f49b33edef774.tar.gz
fork-ledger-c80b4955467a38a2be3aaaa60c9f49b33edef774.tar.bz2
fork-ledger-c80b4955467a38a2be3aaaa60c9f49b33edef774.zip
Adding support for recursive aliases.
Alias expansion is now a loop. If you define alias A=B:A alias B=C:B then A will expand to C:B:A. Also added a short section to the manual about this.
Diffstat (limited to 'doc')
-rw-r--r--doc/ledger3.texi15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 4ab8f4fd..051c7c76 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -2158,9 +2158,22 @@ alias Checking=Assets:Credit Union:Joint Checking Account
@end smallexample
The aliases are only in effect for transactions read in after the alias
-is defined and are effected by @code{account} directives that precede
+is defined and are affected by @code{account} directives that precede
them.
+Aliases can refer to other aliases, the following example produces exactly
+the same accounts as the preceding one:
+
+@smallexample
+alias Entertainment=Expenses:Entertainment
+alias Dining=Entertainment:Dining
+alias Checking=Assets:Credit Union:Joint Checking Account
+
+2011/11/30 ChopChop
+ Dining $10.00
+ Checking
+@end smallexample
+
@item assert
@c instance_t::assert_directive
An assertion can throw an error if a condition is not met during