summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBradley M. Kuhn <bkuhn@ebb.org>2014-06-05 08:17:47 -0400
committerBradley M. Kuhn <bkuhn@ebb.org>2014-06-05 08:17:47 -0400
commitbb59564b796abe3badd7b07abdb4abd8ffb0cdde (patch)
treed2874b14ee8c14166ee1dedf2a4d8f2c62d11947 /doc
parenta5ffcc42ff2d6f6d06141b5098337f4bc092d2e0 (diff)
downloadfork-ledger-bb59564b796abe3badd7b07abdb4abd8ffb0cdde.tar.gz
fork-ledger-bb59564b796abe3badd7b07abdb4abd8ffb0cdde.tar.bz2
fork-ledger-bb59564b796abe3badd7b07abdb4abd8ffb0cdde.zip
Document --exchange COMMODITY1:COMMODITY2 syntax.
It appears this syntax does indeed work as described in this change, but the feature was not previously documented herein.
Diffstat (limited to 'doc')
-rw-r--r--doc/ledger3.texi22
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index d4df63ec..2897aa9f 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -6262,7 +6262,16 @@ FIX THIS ENTRY @c ASK JOHN
@item --exchange @var{COMMODITY}
@itemx -X @var{COMMODITY}
Display values in terms of the given @var{COMMODITY}. The latest
-available price is used.
+available price is used. The syntax
+@option{-X @var{COMMODITY1}:@var{COMMODITY2}} displays values in @var{COMMODITY1}
+in terms of @var{COMMODITY2} using the latest available price, but
+will not automatically covert any other commodities to
+@var{COMMODITY2}. Multiple @option{-X} arguments may be used on a
+single command line (as in
+@option{-X COMMODITY1:COMMODITY2 -X COMMODITY3:COMMODITY2}),
+which is particularly useful for situations where many prices are
+available for reporting in terms of @var{COMMODITY2}, but only a few
+should be displayed that way .
@item --flat
Force the full names of accounts to be used in the balance report. The
@@ -7342,6 +7351,17 @@ You can also now use @option{--exchange @var{COMMODITY} (-X)} (and
and @option{--price (-I)}, to see valuation reports of just your basis
costs or lot prices.
+Finally, sometimes, you may seek to only report one (or some subset)
+of the commodities in terms of another commodity. In this
+situation, you can use the syntax
+@option{--exchange @var{COMMODITY1}:@var{COMMODITY2}} to request that
+ledger always display @var{COMMODITY1} in terms of @var{COMMODITY2},
+but you want no other commodities to be automatically displayed in terms of
+@var{COMMODITY2} without additional @option{--exchange} options. For
+example, if you wanted to report EUR and BTC in terms of USD, but report
+all other commodities without conversion to USD, you could use:
+@option{--exchange EUR:USD -X BTC:USD}.
+
@node Environment variables, , Commodity reporting, Detailed Option Description
@subsection Environment variables