summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ledger.13
-rw-r--r--doc/ledger3.texi21
2 files changed, 23 insertions, 1 deletions
diff --git a/doc/ledger.1 b/doc/ledger.1
index 659d3fbb..ecd97ecc 100644
--- a/doc/ledger.1
+++ b/doc/ledger.1
@@ -420,6 +420,9 @@ For use only with the
command, it causes Ledger to print out matching entries exactly as they
appeared in the original journal file.
.It Fl \-real Pq Fl R
+.It Fl \-recursive-aliases
+Causes ledger to try to expand aliases recursively, i.e. try to expand
+the result of an earlier expansion again, until no more expansions apply.
.It Fl \-register-format Ar FMT
.It Fl \-related Pq Fl r
.It Fl \-related-all
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index 4ab8f4fd..1a8fd9aa 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -2158,9 +2158,23 @@ 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.
+With the option @option{--recursive-aliases}, aliases can refer to other aliases,
+the following example produces exactly the same transactions and account names
+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
@@ -5801,6 +5815,11 @@ correct, and if it finds a new account or commodity (same as
a misspelled commodity or account) it will issue a warning giving you
the file and line number of the problem.
+@item --recursive-aliases
+Normally, ledger only expands aliases once. With this option, ledger tries
+to expand the result of alias expansion recursively, until no more expansions
+apply.
+
@item --time-colon
The @option{--time-colon} option will display the value for a seconds
based commodity as real hours and minutes.