summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md12
-rw-r--r--embeddedfiles/hledger.1273
-rw-r--r--embeddedfiles/hledger.info597
-rw-r--r--embeddedfiles/hledger.txt893
-rw-r--r--embeddedfiles/hledger_csv.52
-rw-r--r--embeddedfiles/hledger_csv.info64
-rw-r--r--embeddedfiles/hledger_csv.txt2
-rw-r--r--embeddedfiles/hledger_journal.52
-rw-r--r--embeddedfiles/hledger_journal.info220
-rw-r--r--embeddedfiles/hledger_journal.txt2
-rw-r--r--embeddedfiles/hledger_timeclock.52
-rw-r--r--embeddedfiles/hledger_timeclock.info4
-rw-r--r--embeddedfiles/hledger_timeclock.txt2
-rw-r--r--embeddedfiles/hledger_timedot.52
-rw-r--r--embeddedfiles/hledger_timedot.info8
-rw-r--r--embeddedfiles/hledger_timedot.txt2
-rw-r--r--hledger.1273
-rw-r--r--hledger.cabal18
-rw-r--r--hledger.info597
-rw-r--r--hledger.txt893
20 files changed, 2104 insertions, 1764 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 0b2f61b..0504d5f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,7 +1,17 @@
User-visible changes in the hledger command line tool and library.
-# ebacb20b
+# 1.15.2 2019-09-05
+
+- -V and -X now respect a report end date (set with -e or -p or date:)
+ when choosing the valuation date (which determines the market prices
+ used). This is how -V works in hledger 1.14 and Ledger, and it means
+ that -V isn't exactly equivalent to either --value=end or
+ --value=now. Possibly some other corner cases in valuation have been
+ fixed as well. "Effect of --value on reports" in the hledger manual
+ has been updated and is more accurate.
+
+# 1.15.1 2019-09-02
- add commodities, descriptions, diff, notes, payees commands to manual
diff --git a/embeddedfiles/hledger.1 b/embeddedfiles/hledger.1
index 1c38990..7c4a0ad 100644
--- a/embeddedfiles/hledger.1
+++ b/embeddedfiles/hledger.1
@@ -1,6 +1,6 @@
.\"t
-.TH "hledger" "1" "August 2019" "hledger 1.15" "hledger User Manuals"
+.TH "hledger" "1" "September 2019" "hledger 1.15.2" "hledger User Manuals"
@@ -1015,10 +1015,9 @@ This flag is equivalent to \f[C]--value=cost\f[R], described below.
The \f[C]-V/--market\f[R] flag converts reported amounts to their market
value in a default valuation commodity, using the market prices in
effect on a default valuation date.
-For single period reports, the valuation date is today; for multiperiod
-reports, it is the last day of each subperiod.
-It is equivalent to \f[C]--value=now\f[R] or \f[C]--value=end\f[R] (see
-below).
+For single period reports, the valuation date is today (equivalent to
+\f[C]--value=now\f[R]); for multiperiod reports, it is the last day of
+each subperiod (equivalent to \f[C]--value=end\f[R]).
.PP
The default valuation commodity is the one referenced in the latest
applicable market price dated on or before the valuation date.
@@ -1026,7 +1025,11 @@ If most of your P declarations lead to a single home currency, this will
usually be what you want.
(To specify the commodity, see -X below.)
.PP
-Here\[aq]s a quick example:
+Note that in hledger, market prices are always declared explicitly with
+P directives; we do not infer them from transaction prices as Ledger
+does.
+.PP
+Here\[aq]s a quick example of -V:
.IP
.nf
\f[C]
@@ -1070,20 +1073,13 @@ $ hledger -f t.j bal -N euros -V
$103.00 assets:euros
\f[R]
.fi
-.PP
-Note that in hledger, market prices are always declared explicitly with
-P directives; we do not infer them from transaction prices as Ledger
-does.
.SS -X: Market value in specified commodity
.PP
-The \f[C]-X/--exchange\f[R] option is like \f[C]-V/--market\f[R] except
-it takes a commodity symbol argument, so that you can select a different
-target commodity.
-It is similar to the same option in Ledger, with the same caveat
-mentioned above.
+The \f[C]-X/--exchange\f[R] option is like \f[C]-V\f[R], except it
+specifies the target commodity you would like to convert to.
It is equivalent to \f[C]--value=now,COMM\f[R] or
\f[C]--value=end,COMM\f[R].
-.SS --value
+.SS --value: Flexible valuation
.PP
\f[I](experimental, added 201905)\f[R]
.PP
@@ -1101,43 +1097,36 @@ more general \f[C]--value\f[R] option:
- default valuation commodity (or COMM) using market prices at some date
\f[R]
.fi
-.SS Valuation type
.PP
-TYPE is one of these keywords, or their first letter, or a date (which
-must be 8 digits with \f[C]-\f[R] or \f[C]/\f[R] or \f[C].\f[R]
-separators):
+The TYPE part basically selects either \[dq]cost\[dq], or \[dq]market
+value\[dq] plus a valuation date:
.TP
.B \f[C]--value=cost\f[R]
Convert amounts to cost, using the prices recorded in transactions.
-\f[C]-B\f[R]/\f[C]--cost\f[R] is equivalent to this.
.TP
.B \f[C]--value=end\f[R]
-Convert amounts to their value in default valuation commodity using
-market prices on the last day of the report period (or of each subperiod
-in a multiperiod report).
-When no report period is specified, uses the journal\[aq]s last
-transaction date.
+Convert amounts to their value in a default valuation commodity, using
+market prices on the last day of the report period (or if unspecified,
+the journal\[aq]s end date); or in multiperiod reports, market prices on
+the last day of each subperiod.
.TP
.B \f[C]--value=now\f[R]
Convert amounts to their value in default valuation commodity using
current market prices (as of when report is generated).
-\f[C]-V\f[R]/\f[C]--market\f[R] is equivalent to this.
.TP
.B \f[C]--value=YYYY-MM-DD\f[R]
Convert amounts to their value in default valuation commodity using
market prices on this date.
-Eg \f[C]--value=2019-04-25\f[R].
-.SS Valuation commodity
.PP
The default valuation commodity is the commodity mentioned in the most
recent applicable market price declaration.
When all your price declarations lead to a single home currency, this
will usually do what you want.
.PP
-To select a different valuation commodity: write the commodity symbol
-after the valuation type, separated by a comma (eg:
-\f[B]\f[CB]--value=now,EUR\f[B]\f[R]).
-This will use, in this preferred order:
+To select a different valuation commodity, add the optional
+\f[C],COMM\f[R] part: a comma, then the target commodity\[aq]s symbol.
+Eg: \f[B]\f[CB]--value=now,EUR\f[B]\f[R].
+hledger will do its best to convert amounts to this commodity, using:
.IP \[bu] 2
declared prices (from source commodity to valuation commodity)
.IP \[bu] 2
@@ -1145,10 +1134,12 @@ reverse prices (declared prices from valuation to source commodity,
inverted)
.IP \[bu] 2
indirect prices (prices calculated from the shortest chain of declared
-or reverse prices from source to valuation commodity).
-.SS --value examples
+or reverse prices from source to valuation commodity)
.PP
-Here are the effects of \f[C]--value\f[R] as seen with \f[C]print\f[R]:
+in that order.
+.PP
+Here are some examples showing the effect of \f[C]--value\f[R] as seen
+with \f[C]print\f[R]:
.IP
.nf
\f[C]
@@ -1297,25 +1288,28 @@ $ hledger print -X A
.fi
.SS Effect of --value on reports
.PP
-Below is how \f[C]--value\f[R] affects each of hledger\[aq]s reports,
-currently.
-You\[aq]re not expected to remember all this, but when troubleshooting a
-report, look here.
-If you find problems - useless reports, misbehaving reports, or error
-messages being printed - please report them (with reproducible examples)
-eg at #329.
+Here is a reference for how \f[C]--value\f[R] currently affects each
+part of hledger\[aq]s reports.
+It\[aq]s work in progress, but may be useful for troubleshooting or
+reporting bugs.
+See also the definitions and notes below.
+If you find problems, please report them, ideally with a reproducible
+example.
+Related: #329, #1083.
.PP
.TS
tab(@);
-lw(12.5n) lw(13.6n) lw(25.4n) lw(18.4n).
+lw(14.4n) lw(13.8n) lw(14.6n) lw(15.2n) lw(12.0n).
T{
Report type
T}@T{
-\f[C]--value\f[R] \f[C]cost\f[R]\
+\f[C]-B\f[R], \f[C]--value=cost\f[R]
+T}@T{
+\f[C]-V\f[R], \f[C]-X\f[R]
T}@T{
-\f[C]--value\f[R] \f[C]end\f[R]\
+\f[C]--value=end\f[R]
T}@T{
-\f[C]--value\f[R] \f[C]DATE\f[R]/\f[C]now\f[R]\
+\f[C]--value=DATE\f[R], \f[C]--value=now\f[R]
T}
_
T{
@@ -1323,119 +1317,224 @@ T{
T}@T{
T}@T{
T}@T{
+T}@T{
T}
T{
posting amounts
T}@T{
-cost, as recorded in transaction
+cost
+T}@T{
+value at report end or today
T}@T{
-market value at report end
+value at report or journal end
T}@T{
-market value at DATE
+value at DATE/today
T}
T{
-balance assertions/assignments
+balance assertions / assignments
+T}@T{
+unchanged
+T}@T{
+unchanged
+T}@T{
+unchanged
+T}@T{
+unchanged
+T}
+T{
+T}@T{
T}@T{
-show unvalued
T}@T{
-show unvalued
T}@T{
-show unvalued
T}
T{
\f[B]register\f[R]
T}@T{
T}@T{
T}@T{
+T}@T{
T}
T{
-starting balance with -H
+starting balance (with -H)
T}@T{
-cost of starting balance
+cost
T}@T{
-market value at day before report start
+value at day before report or journal start
T}@T{
-market value at DATE
+value at day before report or journal start
+T}@T{
+value at DATE/today
T}
T{
-posting amounts
+posting amounts (no report interval)
T}@T{
cost
T}@T{
-market value at report end
+value at report end or today
T}@T{
-market value at DATE
+value at report or journal end
+T}@T{
+value at DATE/today
T}
T{
-posting amounts, multiperiod
+summary posting amounts (with report interval)
T}@T{
summarised cost
T}@T{
-market value each summary posting at period end
+value at period ends
+T}@T{
+value at period ends
T}@T{
-market value each summary posting at DATE
+value at DATE/today
T}
T{
running total/average
T}@T{
-sum/average of the displayed values
+sum/average of displayed values
T}@T{
-sum/average of the displayed values
+sum/average of displayed values
T}@T{
-sum/average of the displayed values
+sum/average of displayed values
+T}@T{
+sum/average of displayed values
T}
T{
-\f[B]balance (bs, cf, is..)\f[R]
+T}@T{
T}@T{
T}@T{
T}@T{
T}
T{
-starting balances with -H
+\f[B]balance (bs, bse, cf, is..)\f[R]
+T}@T{
T}@T{
-costs of starting balances
T}@T{
-market value at day before report start of sum of previous postings
T}@T{
-market value at DATE of sum of previous postings
T}
T{
-balances, simple balance report
+balances (no report interval)
T}@T{
-summed costs
+sums of costs
T}@T{
-market value at period end of sum of postings
+value at report end or today of sums of postings
T}@T{
-market value at DATE of sum of postings
+value at report or journal end of sums of postings
+T}@T{
+value at DATE/today of sums of postings
T}
T{
-balances, multiperiod report
+balances (with report interval)
+T}@T{
+sums of costs
T}@T{
-summed costs
+value at period ends of sums of postings
T}@T{
-market value at period end of sum of postings
+value at period ends of sums of postings
T}@T{
-market value at DATE of sum of postings
+value at DATE/today of sums of postings
+T}
+T{
+starting balances (with report interval and -H)
+T}@T{
+sums of costs of postings before report start
+T}@T{
+sums of postings before report start
+T}@T{
+sums of postings before report start
+T}@T{
+sums of postings before report start
T}
T{
budget amounts with --budget
T}@T{
-costs of budget amounts
+like balances
+T}@T{
+like balances
+T}@T{
+like balances
+T}@T{
+like balances
+T}
+T{
+grand total (no report interval)
+T}@T{
+sum of displayed values
+T}@T{
+sum of displayed values
+T}@T{
+sum of displayed values
+T}@T{
+sum of displayed values
+T}
+T{
+row totals/averages (with report interval)
+T}@T{
+sums/averages of displayed values
+T}@T{
+sums/averages of displayed values
+T}@T{
+sums/averages of displayed values
+T}@T{
+sums/averages of displayed values
+T}
+T{
+column totals
+T}@T{
+sums of displayed values
+T}@T{
+sums of displayed values
+T}@T{
+sums of displayed values
+T}@T{
+sums of displayed values
+T}
+T{
+grand total/average
+T}@T{
+sum/average of column totals
+T}@T{
+sum/average of column totals
T}@T{
-budget-setting periodic txns are valued at period end
+sum/average of column totals
T}@T{
-budget-setting periodic txns are valued at DATE
+sum/average of column totals
T}
T{
-column/row/grand totals/averages
T}@T{
-sum/average of the displayed values
T}@T{
-market value at period end of sum/average of postings
T}@T{
-market value at DATE of sum/average of postings
+T}@T{
T}
.TE
+.PP
+\f[B]Additional notes\f[R]
+.TP
+.B \f[I]cost\f[R]
+calculated using price(s) recorded in the transaction(s).
+.TP
+.B \f[I]value\f[R]
+market value using available market price declarations, or the unchanged
+amount if no conversion rate can be found.
+.TP
+.B \f[I]report start\f[R]
+the first day of the report period specified with -b or -p or date:,
+otherwise today.
+.TP
+.B \f[I]report or journal start\f[R]
+the first day of the report period specified with -b or -p or date:,
+otherwise the earliest transaction date in the journal, otherwise today.
+.TP
+.B \f[I]report end\f[R]
+the last day of the report period specified with -e or -p or date:,
+otherwise today.
+.TP
+.B \f[I]report or journal end\f[R]
+the last day of the report period specified with -e or -p or date:,
+otherwise the latest transaction date in the journal, otherwise today.
+.TP
+.B \f[I]report interval\f[R]
+a flag (-D/-W/-M/-Q/-Y) or period expression that activates the
+report\[aq]s multi-period mode (whether showing one or many subperiods).
.SS Combining -B, -V, -X, --value
.PP
The rightmost of these flags wins.
diff --git a/embeddedfiles/hledger.info b/embeddedfiles/hledger.info
index c7c3e74..bf6fbb0 100644
--- a/embeddedfiles/hledger.info
+++ b/embeddedfiles/hledger.info
@@ -3,8 +3,8 @@ This is hledger.info, produced by makeinfo version 6.5 from stdin.

File: hledger.info, Node: Top, Next: EXAMPLES, Up: (dir)
-hledger(1) hledger 1.15
-***********************
+hledger(1) hledger 1.15.2
+*************************
This is hledger's command-line interface (there are also curses and web
interfaces). Its basic function is to read a plain text file describing
@@ -753,7 +753,8 @@ File: hledger.info, Node: Valuation, Next: Output destination, Prev: Pivoting
* -B Cost::
* -V Market value::
* -X Market value in specified commodity::
-* --value::
+* --value Flexible valuation::
+* Effect of --value on reports::
* Combining -B -V -X --value::

@@ -775,15 +776,19 @@ File: hledger.info, Node: -V Market value, Next: -X Market value in specified
The '-V/--market' flag converts reported amounts to their market value
in a default valuation commodity, using the market prices in effect on a
default valuation date. For single period reports, the valuation date
-is today; for multiperiod reports, it is the last day of each subperiod.
-It is equivalent to '--value=now' or '--value=end' (see below).
+is today (equivalent to '--value=now'); for multiperiod reports, it is
+the last day of each subperiod (equivalent to '--value=end').
The default valuation commodity is the one referenced in the latest
applicable market price dated on or before the valuation date. If most
of your P declarations lead to a single home currency, this will usually
be what you want. (To specify the commodity, see -X below.)
- Here's a quick example:
+ Note that in hledger, market prices are always declared explicitly
+with P directives; we do not infer them from transaction prices as
+Ledger does.
+
+ Here's a quick example of -V:
; one euro is worth this many dollars from nov 1
P 2016/11/01 € $1.10
@@ -812,27 +817,21 @@ specified, defaults to today)
$ hledger -f t.j bal -N euros -V
$103.00 assets:euros
- Note that in hledger, market prices are always declared explicitly
-with P directives; we do not infer them from transaction prices as
-Ledger does.
-

-File: hledger.info, Node: -X Market value in specified commodity, Next: --value, Prev: -V Market value, Up: Valuation
+File: hledger.info, Node: -X Market value in specified commodity, Next: --value Flexible valuation, Prev: -V Market value, Up: Valuation
2.15.3 -X: Market value in specified commodity
----------------------------------------------
-The '-X/--exchange' option is like '-V/--market' except it takes a
-commodity symbol argument, so that you can select a different target
-commodity. It is similar to the same option in Ledger, with the same
-caveat mentioned above. It is equivalent to '--value=now,COMM' or
-'--value=end,COMM'.
+The '-X/--exchange' option is like '-V', except it specifies the target
+commodity you would like to convert to. It is equivalent to
+'--value=now,COMM' or '--value=end,COMM'.

-File: hledger.info, Node: --value, Next: Combining -B -V -X --value, Prev: -X Market value in specified commodity, Up: Valuation
+File: hledger.info, Node: --value Flexible valuation, Next: Effect of --value on reports, Prev: -X Market value in specified commodity, Up: Valuation
-2.15.4 -value
--------------
+2.15.4 -value: Flexible valuation
+---------------------------------
_(experimental, added 201905)_
@@ -847,70 +846,47 @@ option:
- default valuation commodity (or COMM) using current market prices
- default valuation commodity (or COMM) using market prices at some date
-* Menu:
-
-* Valuation type::
-* Valuation commodity::
-* --value examples::
-* Effect of --value on reports::
-
-
-File: hledger.info, Node: Valuation type, Next: Valuation commodity, Up: --value
-
-2.15.4.1 Valuation type
-.......................
-
-TYPE is one of these keywords, or their first letter, or a date (which
-must be 8 digits with '-' or '/' or '.' separators):
+ The TYPE part basically selects either "cost", or "market value" plus
+a valuation date:
'--value=cost'
Convert amounts to cost, using the prices recorded in transactions.
- '-B'/'--cost' is equivalent to this.
'--value=end'
- Convert amounts to their value in default valuation commodity using
- market prices on the last day of the report period (or of each
- subperiod in a multiperiod report). When no report period is
- specified, uses the journal's last transaction date.
+ Convert amounts to their value in a default valuation commodity,
+ using market prices on the last day of the report period (or if
+ unspecified, the journal's end date); or in multiperiod reports,
+ market prices on the last day of each subperiod.
'--value=now'
Convert amounts to their value in default valuation commodity using
current market prices (as of when report is generated).
- '-V'/'--market' is equivalent to this.
'--value=YYYY-MM-DD'
Convert amounts to their value in default valuation commodity using
- market prices on this date. Eg '--value=2019-04-25'.
-
-
-File: hledger.info, Node: Valuation commodity, Next: --value examples, Prev: Valuation type, Up: --value
+ market prices on this date.
-2.15.4.2 Valuation commodity
-............................
-
-The default valuation commodity is the commodity mentioned in the most
-recent applicable market price declaration. When all your price
+ The default valuation commodity is the commodity mentioned in the
+most recent applicable market price declaration. When all your price
declarations lead to a single home currency, this will usually do what
you want.
- To select a different valuation commodity: write the commodity symbol
-after the valuation type, separated by a comma (eg:
-*'--value=now,EUR'*). This will use, in this preferred order:
+ To select a different valuation commodity, add the optional ',COMM'
+part: a comma, then the target commodity's symbol. Eg:
+*'--value=now,EUR'*. hledger will do its best to convert amounts to
+this commodity, using:
* declared prices (from source commodity to valuation commodity)
* reverse prices (declared prices from valuation to source commodity,
inverted)
* indirect prices (prices calculated from the shortest chain of
- declared or reverse prices from source to valuation commodity).
+ declared or reverse prices from source to valuation commodity)
-
-File: hledger.info, Node: --value examples, Next: Effect of --value on reports, Prev: Valuation commodity, Up: --value
+ in that order.
-2.15.4.3 -value examples
-........................
-
-Here are the effects of '--value' as seen with 'print':
+ Here are some examples showing the effect of '--value' as seen with
+'print':
P 2000-01-01 A 1 B
P 2000-02-01 A 2 B
@@ -1018,65 +994,116 @@ $ hledger print -X A
b -0.50A

-File: hledger.info, Node: Effect of --value on reports, Prev: --value examples, Up: --value
+File: hledger.info, Node: Effect of --value on reports, Next: Combining -B -V -X --value, Prev: --value Flexible valuation, Up: Valuation
-2.15.4.4 Effect of -value on reports
-....................................
+2.15.5 Effect of -value on reports
+----------------------------------
-Below is how '--value' affects each of hledger's reports, currently.
-You're not expected to remember all this, but when troubleshooting a
-report, look here. If you find problems - useless reports, misbehaving
-reports, or error messages being printed - please report them (with
-reproducible examples) eg at #329.
+Here is a reference for how '--value' currently affects each part of
+hledger's reports. It's work in progress, but may be useful for
+troubleshooting or reporting bugs. See also the definitions and notes
+below. If you find problems, please report them, ideally with a
+reproducible example. Related: #329, #1083.
-Report type '--value' '--value' 'end' '--value'
- 'cost' 'DATE'/'now'
-----------------------------------------------------------------------------
+Report type '-B', '-V', '-X' '--value=end' '--value=DATE',
+ '--value=cost' '--value=now'
+-----------------------------------------------------------------------------
*print*
-posting cost, as market value at report market value at
-amounts recorded in end DATE
- transaction
-balance show show unvalued show unvalued
-assertions/assignmentsunvalued
+posting cost value at value at value at
+amounts report end or report or DATE/today
+ today journal end
+balance unchanged unchanged unchanged unchanged
+assertions /
+assignments
*register*
-starting cost of market value at day market value at
-balance starting before report start DATE
-with -H balance
-posting cost market value at report market value at
-amounts end DATE
-posting summarised market value each market value each
-amounts, cost summary posting at summary posting
-multiperiod period end at DATE
-running sum/average sum/average of the sum/average of
-total/average of the displayed values the displayed
- displayed values
- values
-*balance
-(bs, cf,
-is..)*
-starting costs of market value at day market value at
-balances starting before report start of DATE of sum of
-with -H balances sum of previous postings previous postings
-balances, summed costs market value at period market value at
-simple end of sum of postings DATE of sum of
-balance postings
+starting cost value at day value at day value at
+balance (with before report before report DATE/today
+-H) or journal or journal
+ start start
+posting cost value at value at value at
+amounts (no report end or report or DATE/today
+report today journal end
+interval)
+summary summarised value at value at value at
+posting cost period ends period ends DATE/today
+amounts (with
report
-balances, summed costs market value at period market value at
-multiperiod end of sum of postings DATE of sum of
-report postings
-budget costs of budget-setting periodic budget-setting
-amounts budget txns are valued at periodic txns are
-with amounts period end valued at DATE
+interval)
+running sum/average sum/average sum/average of sum/average
+total/average of displayed of displayed displayed of
+ values values values displayed
+ values
+*balance (bs,
+bse, cf,
+is..)*
+balances (no sums of value at value at value at
+report costs report end or report or DATE/today
+interval) today of sums journal end of of sums of
+ of postings sums of postings
+ postings
+balances sums of value at value at value at
+(with report costs period ends period ends of DATE/today
+interval) of sums of sums of of sums of
+ postings postings postings
+starting sums of sums of sums of sums of
+balances costs of postings postings postings
+(with report postings before report before report before
+interval and before start start report
+-H) report start start
+budget like like balances like balances like
+amounts with balances balances
-budget
-column/row/grandsum/average market value at period market value at
-totals/averagesof the end of sum/average of DATE of
- displayed postings sum/average of
- values postings
+grand total sum of sum of sum of sum of
+(no report displayed displayed displayed displayed
+interval) values values values values
+row sums/averages sums/averages sums/averages sums/averages
+totals/averages of displayed of displayed of displayed of
+(with report values values values displayed
+interval) values
+column totals sums of sums of sums of sums of
+ displayed displayed displayed displayed
+ values values values values
+grand sum/average sum/average sum/average of sum/average
+total/average of column of column column totals of column
+ totals totals totals
+
+ *Additional notes*
+
+_cost_
+
+ calculated using price(s) recorded in the transaction(s).
+_value_
+
+ market value using available market price declarations, or the
+ unchanged amount if no conversion rate can be found.
+_report start_
+
+ the first day of the report period specified with -b or -p or
+ date:, otherwise today.
+_report or journal start_
+
+ the first day of the report period specified with -b or -p or
+ date:, otherwise the earliest transaction date in the journal,
+ otherwise today.
+_report end_
+
+ the last day of the report period specified with -e or -p or date:,
+ otherwise today.
+_report or journal end_
+
+ the last day of the report period specified with -e or -p or date:,
+ otherwise the latest transaction date in the journal, otherwise
+ today.
+_report interval_
+
+ a flag (-D/-W/-M/-Q/-Y) or period expression that activates the
+ report's multi-period mode (whether showing one or many
+ subperiods).

-File: hledger.info, Node: Combining -B -V -X --value, Prev: --value, Up: Valuation
+File: hledger.info, Node: Combining -B -V -X --value, Prev: Effect of --value on reports, Up: Valuation
-2.15.5 Combining -B, -V, -X, -value
+2.15.6 Combining -B, -V, -X, -value
-----------------------------------
The rightmost of these flags wins.
@@ -3133,185 +3160,179 @@ hledger-check.hs checks more powerful account balance assertions.

Tag Table:
Node: Top68
-Node: EXAMPLES1885
-Ref: #examples1985
-Node: OPTIONS3631
-Ref: #options3733
-Node: General options4132
-Ref: #general-options4257
-Node: Command options6911
-Ref: #command-options7062
-Node: Command arguments7460
-Ref: #command-arguments7614
-Node: Argument files7735
-Ref: #argument-files7911
-Node: Special characters in arguments and queries8177
-Ref: #special-characters-in-arguments-and-queries8411
-Node: More escaping8862
-Ref: #more-escaping9024
-Node: Even more escaping9320
-Ref: #even-more-escaping9514
-Node: Less escaping10185
-Ref: #less-escaping10347
-Node: Command line tips10592
-Ref: #command-line-tips10778
-Node: Unicode characters11155
-Ref: #unicode-characters11311
-Node: Input files12723
-Ref: #input-files12859
-Node: Smart dates14788
-Ref: #smart-dates14929
-Node: Report start & end date16335
-Ref: #report-start-end-date16507
-Node: Report intervals17931
-Ref: #report-intervals18096
-Node: Period expressions18486
-Ref: #period-expressions18646
-Node: Depth limiting22603
-Ref: #depth-limiting22747
-Node: Pivoting23089
-Ref: #pivoting23212
-Node: Valuation24888
-Ref: #valuation25017
-Node: -B Cost25145
-Ref: #b-cost25256
-Node: -V Market value25454
-Ref: #v-market-value25628
-Node: -X Market value in specified commodity27058
-Ref: #x-market-value-in-specified-commodity27278
-Node: --value27572
-Ref: #value27737
-Node: Valuation type28538
-Ref: #valuation-type28674
-Node: Valuation commodity29559
-Ref: #valuation-commodity29730
-Node: --value examples30430
-Ref: #value-examples30607
-Node: Effect of --value on reports32590
-Ref: #effect-of---value-on-reports32763
-Node: Combining -B -V -X --value35454
-Ref: #combining--b--v--x---value35616
-Node: Output destination35652
-Ref: #output-destination35804
-Node: Output format36087
-Ref: #output-format36239
-Node: Regular expressions36624
-Ref: #regular-expressions36761
-Node: QUERIES38122
-Ref: #queries38224
-Node: COMMANDS42186
-Ref: #commands42298
-Node: accounts43362
-Ref: #accounts43460
-Node: activity44159
-Ref: #activity44269
-Node: add44652
-Ref: #add44751
-Node: balance47496
-Ref: #balance47607
-Node: Classic balance report49049
-Ref: #classic-balance-report49222
-Node: Customising the classic balance report50591
-Ref: #customising-the-classic-balance-report50819
-Node: Colour support52895
-Ref: #colour-support53062
-Node: Flat mode53235
-Ref: #flat-mode53383
-Node: Depth limited balance reports53796
-Ref: #depth-limited-balance-reports53996
-Node: Multicolumn balance report54452
-Ref: #multicolumn-balance-report54650
-Node: Budget report59964
-Ref: #budget-report60107
-Node: Nested budgets65309
-Ref: #nested-budgets65421
-Ref: #output-format-168901
-Node: balancesheet68979
-Ref: #balancesheet69115
-Node: balancesheetequity70430
-Ref: #balancesheetequity70579
-Node: cashflow71140
-Ref: #cashflow71268
-Node: check-dates72296
-Ref: #check-dates72423
-Node: check-dupes72702
-Ref: #check-dupes72826
-Node: close73119
-Ref: #close73233
-Node: commodities76820
-Ref: #commodities76947
-Node: descriptions77029
-Ref: #descriptions77157
-Node: diff77338
-Ref: #diff77444
-Node: files78491
-Ref: #files78591
-Node: help78738
-Ref: #help78838
-Node: import79931
-Ref: #import80045
-Node: Importing balance assignments80833
-Ref: #importing-balance-assignments80981
-Node: incomestatement81630
-Ref: #incomestatement81763
-Node: notes83099
-Ref: #notes83212
-Node: payees83338
-Ref: #payees83444
-Node: prices83602
-Ref: #prices83708
-Node: print83987
-Ref: #print84097
-Node: print-unique88590
-Ref: #print-unique88716
-Node: register89001
-Ref: #register89128
-Node: Custom register output93300
-Ref: #custom-register-output93429
-Node: register-match94691
-Ref: #register-match94825
-Node: rewrite95176
-Ref: #rewrite95291
-Node: Re-write rules in a file97146
-Ref: #re-write-rules-in-a-file97280
-Node: Diff output format98490
-Ref: #diff-output-format98659
-Node: rewrite vs print --auto99751
-Ref: #rewrite-vs.-print---auto99930
-Node: roi100486
-Ref: #roi100584
-Node: stats101596
-Ref: #stats101695
-Node: tags102483
-Ref: #tags102581
-Node: test102875
-Ref: #test102959
-Node: ADD-ON COMMANDS103720
-Ref: #add-on-commands103830
-Node: Official add-ons105118
-Ref: #official-add-ons105258
-Node: api105346
-Ref: #api105435
-Node: ui105487
-Ref: #ui105586
-Node: web105644
-Ref: #web105733
-Node: Third party add-ons105779
-Ref: #third-party-add-ons105954
-Ref: #diff-1106113
-Node: iadd106212
-Ref: #iadd106322
-Node: interest106405
-Ref: #interest106526
-Node: irr106621
-Ref: #irr106719
-Node: Experimental add-ons106850
-Ref: #experimental-add-ons107002
-Node: autosync107283
-Ref: #autosync107394
-Node: chart107633
-Ref: #chart107752
-Node: check107823
-Ref: #check107925
+Node: EXAMPLES1889
+Ref: #examples1989
+Node: OPTIONS3635
+Ref: #options3737
+Node: General options4136
+Ref: #general-options4261
+Node: Command options6915
+Ref: #command-options7066
+Node: Command arguments7464
+Ref: #command-arguments7618
+Node: Argument files7739
+Ref: #argument-files7915
+Node: Special characters in arguments and queries8181
+Ref: #special-characters-in-arguments-and-queries8415
+Node: More escaping8866
+Ref: #more-escaping9028
+Node: Even more escaping9324
+Ref: #even-more-escaping9518
+Node: Less escaping10189
+Ref: #less-escaping10351
+Node: Command line tips10596
+Ref: #command-line-tips10782
+Node: Unicode characters11159
+Ref: #unicode-characters11315
+Node: Input files12727
+Ref: #input-files12863
+Node: Smart dates14792
+Ref: #smart-dates14933
+Node: Report start & end date16339
+Ref: #report-start-end-date16511
+Node: Report intervals17935
+Ref: #report-intervals18100
+Node: Period expressions18490
+Ref: #period-expressions18650
+Node: Depth limiting22607
+Ref: #depth-limiting22751
+Node: Pivoting23093
+Ref: #pivoting23216
+Node: Valuation24892
+Ref: #valuation25021
+Node: -B Cost25201
+Ref: #b-cost25312
+Node: -V Market value25510
+Ref: #v-market-value25684
+Node: -X Market value in specified commodity27116
+Ref: #x-market-value-in-specified-commodity27355
+Node: --value Flexible valuation27531
+Ref: #value-flexible-valuation27757
+Node: Effect of --value on reports31947
+Ref: #effect-of---value-on-reports32163
+Node: Combining -B -V -X --value37094
+Ref: #combining--b--v--x---value37277
+Node: Output destination37313
+Ref: #output-destination37465
+Node: Output format37748
+Ref: #output-format37900
+Node: Regular expressions38285
+Ref: #regular-expressions38422
+Node: QUERIES39783
+Ref: #queries39885
+Node: COMMANDS43847
+Ref: #commands43959
+Node: accounts45023
+Ref: #accounts45121
+Node: activity45820
+Ref: #activity45930
+Node: add46313
+Ref: #add46412
+Node: balance49157
+Ref: #balance49268
+Node: Classic balance report50710
+Ref: #classic-balance-report50883
+Node: Customising the classic balance report52252
+Ref: #customising-the-classic-balance-report52480
+Node: Colour support54556
+Ref: #colour-support54723
+Node: Flat mode54896
+Ref: #flat-mode55044
+Node: Depth limited balance reports55457
+Ref: #depth-limited-balance-reports55657
+Node: Multicolumn balance report56113
+Ref: #multicolumn-balance-report56311
+Node: Budget report61625
+Ref: #budget-report61768
+Node: Nested budgets66970
+Ref: #nested-budgets67082
+Ref: #output-format-170562
+Node: balancesheet70640
+Ref: #balancesheet70776
+Node: balancesheetequity72091
+Ref: #balancesheetequity72240
+Node: cashflow72801
+Ref: #cashflow72929
+Node: check-dates73957
+Ref: #check-dates74084
+Node: check-dupes74363
+Ref: #check-dupes74487
+Node: close74780
+Ref: #close74894
+Node: commodities78481
+Ref: #commodities78608
+Node: descriptions78690
+Ref: #descriptions78818
+Node: diff78999
+Ref: #diff79105
+Node: files80152
+Ref: #files80252
+Node: help80399
+Ref: #help80499
+Node: import81592
+Ref: #import81706
+Node: Importing balance assignments82494
+Ref: #importing-balance-assignments82642
+Node: incomestatement83291
+Ref: #incomestatement83424
+Node: notes84760
+Ref: #notes84873
+Node: payees84999
+Ref: #payees85105
+Node: prices85263
+Ref: #prices85369
+Node: print85648
+Ref: #print85758
+Node: print-unique90251
+Ref: #print-unique90377
+Node: register90662
+Ref: #register90789
+Node: Custom register output94961
+Ref: #custom-register-output95090
+Node: register-match96352
+Ref: #register-match96486
+Node: rewrite96837
+Ref: #rewrite96952
+Node: Re-write rules in a file98807
+Ref: #re-write-rules-in-a-file98941
+Node: Diff output format100151
+Ref: #diff-output-format100320
+Node: rewrite vs print --auto101412
+Ref: #rewrite-vs.-print---auto101591
+Node: roi102147
+Ref: #roi102245
+Node: stats103257
+Ref: #stats103356
+Node: tags104144
+Ref: #tags104242
+Node: test104536
+Ref: #test104620
+Node: ADD-ON COMMANDS105381
+Ref: #add-on-commands105491
+Node: Official add-ons106779
+Ref: #official-add-ons106919
+Node: api107007
+Ref: #api107096
+Node: ui107148
+Ref: #ui107247
+Node: web107305
+Ref: #web107394
+Node: Third party add-ons107440
+Ref: #third-party-add-ons107615
+Ref: #diff-1107774
+Node: iadd107873
+Ref: #iadd107983
+Node: interest108066
+Ref: #interest108187
+Node: irr108282
+Ref: #irr108380
+Node: Experimental add-ons108511
+Ref: #experimental-add-ons108663
+Node: autosync108944
+Ref: #autosync109055
+Node: chart109294
+Ref: #chart109413
+Node: check109484
+Ref: #check109586

End Tag Table
diff --git a/embeddedfiles/hledger.txt b/embeddedfiles/hledger.txt
index ee9409a..bf412c3 100644
--- a/embeddedfiles/hledger.txt
+++ b/embeddedfiles/hledger.txt
@@ -688,15 +688,19 @@ OPTIONS
The -V/--market flag converts reported amounts to their market value in
a default valuation commodity, using the market prices in effect on a
default valuation date. For single period reports, the valuation date
- is today; for multiperiod reports, it is the last day of each subpe-
- riod. It is equivalent to --value=now or --value=end (see below).
+ is today (equivalent to --value=now); for multiperiod reports, it is
+ the last day of each subperiod (equivalent to --value=end).
The default valuation commodity is the one referenced in the latest ap-
plicable market price dated on or before the valuation date. If most
of your P declarations lead to a single home currency, this will usu-
ally be what you want. (To specify the commodity, see -X below.)
- Here's a quick example:
+ Note that in hledger, market prices are always declared explicitly with
+ P directives; we do not infer them from transaction prices as Ledger
+ does.
+
+ Here's a quick example of -V:
; one euro is worth this many dollars from nov 1
P 2016/11/01 EUR $1.10
@@ -725,18 +729,12 @@ OPTIONS
$ hledger -f t.j bal -N euros -V
$103.00 assets:euros
- Note that in hledger, market prices are always declared explicitly with
- P directives; we do not infer them from transaction prices as Ledger
- does.
-
-X: Market value in specified commodity
- The -X/--exchange option is like -V/--market except it takes a commod-
- ity symbol argument, so that you can select a different target commod-
- ity. It is similar to the same option in Ledger, with the same caveat
- mentioned above. It is equivalent to --value=now,COMM or
- --value=end,COMM.
+ The -X/--exchange option is like -V, except it specifies the target
+ commodity you would like to convert to. It is equivalent to
+ --value=now,COMM or --value=end,COMM.
- --value
+ --value: Flexible valuation
(experimental, added 201905)
-B, -V and -X are special cases of the more general --value option:
@@ -749,49 +747,48 @@ OPTIONS
- default valuation commodity (or COMM) using current market prices
- default valuation commodity (or COMM) using market prices at some date
- Valuation type
- TYPE is one of these keywords, or their first letter, or a date (which
- must be 8 digits with - or / or . separators):
+ The TYPE part basically selects either "cost", or "market value" plus a
+ valuation date:
--value=cost
Convert amounts to cost, using the prices recorded in transac-
- tions. -B/--cost is equivalent to this.
+ tions.
--value=end
- Convert amounts to their value in default valuation commodity
- using market prices on the last day of the report period (or of
- each subperiod in a multiperiod report). When no report period
- is specified, uses the journal's last transaction date.
+ Convert amounts to their value in a default valuation commodity,
+ using market prices on the last day of the report period (or if
+ unspecified, the journal's end date); or in multiperiod reports,
+ market prices on the last day of each subperiod.
--value=now
Convert amounts to their value in default valuation commodity
- using current market prices (as of when report is generated).
- -V/--market is equivalent to this.
+ using current market prices (as of when report is generated).
--value=YYYY-MM-DD
- Convert amounts to their value in default valuation commodity
- using market prices on this date. Eg --value=2019-04-25.
+ Convert amounts to their value in default valuation commodity
+ using market prices on this date.
- Valuation commodity
- The default valuation commodity is the commodity mentioned in the most
+ The default valuation commodity is the commodity mentioned in the most
recent applicable market price declaration. When all your price decla-
- rations lead to a single home currency, this will usually do what you
+ rations lead to a single home currency, this will usually do what you
want.
- To select a different valuation commodity: write the commodity symbol
- after the valuation type, separated by a comma (eg: --value=now,EUR).
- This will use, in this preferred order:
+ To select a different valuation commodity, add the optional ,COMM part:
+ a comma, then the target commodity's symbol. Eg: --value=now,EUR.
+ hledger will do its best to convert amounts to this commodity, using:
o declared prices (from source commodity to valuation commodity)
- o reverse prices (declared prices from valuation to source commodity,
+ o reverse prices (declared prices from valuation to source commodity,
inverted)
- o indirect prices (prices calculated from the shortest chain of de-
- clared or reverse prices from source to valuation commodity).
+ o indirect prices (prices calculated from the shortest chain of de-
+ clared or reverse prices from source to valuation commodity)
- --value examples
- Here are the effects of --value as seen with print:
+ in that order.
+
+ Here are some examples showing the effect of --value as seen with
+ print:
P 2000-01-01 A 1 B
P 2000-02-01 A 2 B
@@ -898,66 +895,114 @@ OPTIONS
b -0.50A
Effect of --value on reports
- Below is how --value affects each of hledger's reports, currently.
- You're not expected to remember all this, but when troubleshooting a
- report, look here. If you find problems - useless reports, misbehaving
- reports, or error messages being printed - please report them (with re-
- producible examples) eg at #329.
-
- Report type --value cost --value end --value DATE/now
- ---------------------------------------------------------------------------------
+ Here is a reference for how --value currently affects each part of
+ hledger's reports. It's work in progress, but may be useful for trou-
+ bleshooting or reporting bugs. See also the definitions and notes be-
+ low. If you find problems, please report them, ideally with a repro-
+ ducible example. Related: #329, #1083.
+
+ Report type -B, -V, -X --value=end --value=DATE,
+ --value=cost --value=now
+ -------------------------------------------------------------------------------------
print
- posting cost, as market value at report market value at
- amounts recorded in end DATE
- transaction
- balance as- show unvalued show unvalued show unvalued
- sertions/as-
+ posting cost value at report value at report value at
+ amounts end or today or journal end DATE/today
+ balance asser- unchanged unchanged unchanged unchanged
+ tions / as-
signments
+
register
- starting cost of start- market value at day be- market value at
- balance with ing balance fore report start DATE
- -H
- posting cost market value at report market value at
- amounts end DATE
- posting summarised market value each summary market value each
- amounts, cost posting at period end summary posting at
- multiperiod DATE
- running to- sum/average of sum/average of the dis- sum/average of the
- tal/average the displayed played values displayed values
- values
- balance (bs,
- cf, is..)
- starting costs of market value at day be- market value at
- balances starting bal- fore report start of sum DATE of sum of
- with -H ances of previous postings previous postings
- balances, summed costs market value at period market value at
- simple bal- end of sum of postings DATE of sum of
- ance report postings
- balances, summed costs market value at period market value at
- multiperiod end of sum of postings DATE of sum of
- report postings
- budget costs of bud- budget-setting periodic budget-setting pe-
- amounts with get amounts txns are valued at period riodic txns are
- --budget end valued at DATE
- col- sum/average of market value at period market value at
- umn/row/grand the displayed end of sum/average of DATE of sum/aver-
- totals/aver- values postings age of postings
- ages
+ starting bal- cost value at day value at day value at
+ ance (with -H) before report before report DATE/today
+ or journal or journal
+ start start
+ posting cost value at report value at report value at
+ amounts (no end or today or journal end DATE/today
+ report inter-
+ val)
+ summary post- summarised value at period value at period value at
+ ing amounts cost ends ends DATE/today
+ (with report
+ interval)
+ running to- sum/average of sum/average of sum/average of sum/average
+ tal/average displayed val- displayed val- displayed val- of displayed
+ ues ues ues values
+
+ balance (bs,
+ bse, cf, is..)
+ balances (no sums of costs value at report value at report value at
+ report inter- end or today of or journal end DATE/today of
+ val) sums of post- of sums of sums of post-
+ ings postings ings
+ balances (with sums of costs value at period value at period value at
+ report inter- ends of sums of ends of sums of DATE/today of
+ val) postings postings sums of post-
+ ings
+ starting bal- sums of costs sums of post- sums of post- sums of post-
+ ances (with of postings ings before re- ings before re- ings before
+ report inter- before report port start port start report start
+ val and -H) start
+ budget amounts like balances like balances like balances like balances
+ with --budget
+ grand total sum of dis- sum of dis- sum of dis- sum of dis-
+ (no report in- played values played values played values played values
+ terval)
+
+ row totals/av- sums/averages sums/averages sums/averages sums/averages
+ erages (with of displayed of displayed of displayed of displayed
+ report inter- values values values values
+ val)
+ column totals sums of dis- sums of dis- sums of dis- sums of dis-
+ played values played values played values played values
+ grand to- sum/average of sum/average of sum/average of sum/average
+ tal/average column totals column totals column totals of column to-
+ tals
+
+
+ Additional notes
+
+ cost calculated using price(s) recorded in the transaction(s).
+
+ value market value using available market price declarations, or the
+ unchanged amount if no conversion rate can be found.
+
+ report start
+ the first day of the report period specified with -b or -p or
+ date:, otherwise today.
+
+ report or journal start
+ the first day of the report period specified with -b or -p or
+ date:, otherwise the earliest transaction date in the journal,
+ otherwise today.
+
+ report end
+ the last day of the report period specified with -e or -p or
+ date:, otherwise today.
+
+ report or journal end
+ the last day of the report period specified with -e or -p or
+ date:, otherwise the latest transaction date in the journal,
+ otherwise today.
+
+ report interval
+ a flag (-D/-W/-M/-Q/-Y) or period expression that activates the
+ report's multi-period mode (whether showing one or many subperi-
+ ods).
Combining -B, -V, -X, --value
The rightmost of these flags wins.
Output destination
- Some commands (print, register, stats, the balance commands) can write
- their output to a destination other than the console. This is con-
+ Some commands (print, register, stats, the balance commands) can write
+ their output to a destination other than the console. This is con-
trolled by the -o/--output-file option.
$ hledger balance -o - # write to stdout (the default)
$ hledger balance -o FILE # write to FILE
Output format
- Some commands can write their output in other formats. Eg print and
- register can output CSV, and the balance commands can output CSV or
+ Some commands can write their output in other formats. Eg print and
+ register can output CSV, and the balance commands can output CSV or
HTML. This is controlled by the -O/--output-format option, or by spec-
ifying a .csv or .html file extension with -o/--output-file.
@@ -967,56 +1012,56 @@ OPTIONS
Regular expressions
hledger uses regular expressions in a number of places:
- o query terms, on the command line and in the hledger-web search form:
+ o query terms, on the command line and in the hledger-web search form:
REGEX, desc:REGEX, cur:REGEX, tag:...=REGEX
o CSV rules conditional blocks: if REGEX ...
- o account alias directives and options: alias /REGEX/ = REPLACEMENT,
+ o account alias directives and options: alias /REGEX/ = REPLACEMENT,
--alias /REGEX/=REPLACEMENT
- hledger's regular expressions come from the regex-tdfa library. In
+ hledger's regular expressions come from the regex-tdfa library. In
general they:
o are case insensitive
- o are infix matching (do not need to match the entire thing being
+ o are infix matching (do not need to match the entire thing being
matched)
o are POSIX extended regular expressions
o also support GNU word boundaries (\<, \>, \b, \B)
- o and parenthesised capturing groups and numeric backreferences in re-
+ o and parenthesised capturing groups and numeric backreferences in re-
placement strings
o do not support mode modifiers like (?s)
Some things to note:
- o In the alias directive and --alias option, regular expressions must
- be enclosed in forward slashes (/REGEX/). Elsewhere in hledger,
+ o In the alias directive and --alias option, regular expressions must
+ be enclosed in forward slashes (/REGEX/). Elsewhere in hledger,
these are not required.
- o In queries, to match a regular expression metacharacter like $ as a
- literal character, prepend a backslash. Eg to search for amounts
+ o In queries, to match a regular expression metacharacter like $ as a
+ literal character, prepend a backslash. Eg to search for amounts
with the dollar sign in hledger-web, write cur:\$.
- o On the command line, some metacharacters like $ have a special mean-
+ o On the command line, some metacharacters like $ have a special mean-
ing to the shell and so must be escaped at least once more. See Spe-
cial characters.
QUERIES
- One of hledger's strengths is being able to quickly report on precise
- subsets of your data. Most commands accept an optional query expres-
- sion, written as arguments after the command name, to filter the data
- by date, account name or other criteria. The syntax is similar to a
+ One of hledger's strengths is being able to quickly report on precise
+ subsets of your data. Most commands accept an optional query expres-
+ sion, written as arguments after the command name, to filter the data
+ by date, account name or other criteria. The syntax is similar to a
web search: one or more space-separated search terms, quotes to enclose
- whitespace, prefixes to match specific fields, a not: prefix to negate
+ whitespace, prefixes to match specific fields, a not: prefix to negate
the match.
- We do not yet support arbitrary boolean combinations of search terms;
- instead most commands show transactions/postings/accounts which match
+ We do not yet support arbitrary boolean combinations of search terms;
+ instead most commands show transactions/postings/accounts which match
(or negatively match):
o any of the description terms AND
@@ -1037,31 +1082,31 @@ QUERIES
o match all the other terms.
- The following kinds of search terms can be used. Remember these can
+ The following kinds of search terms can be used. Remember these can
also be prefixed with not:, eg to exclude a particular subaccount.
REGEX, acct:REGEX
- match account names by this regular expression. (With no pre-
+ match account names by this regular expression. (With no pre-
fix, acct: is assumed.) same as above
amt:N, amt:<N, amt:<=N, amt:>N, amt:>=N
- match postings with a single-commodity amount that is equal to,
- less than, or greater than N. (Multi-commodity amounts are not
+ match postings with a single-commodity amount that is equal to,
+ less than, or greater than N. (Multi-commodity amounts are not
tested, and will always match.) The comparison has two modes: if
N is preceded by a + or - sign (or is 0), the two signed numbers
- are compared. Otherwise, the absolute magnitudes are compared,
+ are compared. Otherwise, the absolute magnitudes are compared,
ignoring sign.
code:REGEX
match by transaction code (eg check number)
cur:REGEX
- match postings or transactions including any amounts whose cur-
- rency/commodity symbol is fully matched by REGEX. (For a par-
+ match postings or transactions including any amounts whose cur-
+ rency/commodity symbol is fully matched by REGEX. (For a par-
tial match, use .*REGEX.*). Note, to match characters which are
regex-significant, like the dollar sign ($), you need to prepend
- \. And when using the command line you need to add one more
- level of quoting to hide it from the shell, so eg do: hledger
+ \. And when using the command line you need to add one more
+ level of quoting to hide it from the shell, so eg do: hledger
print cur:'\$' or hledger print cur:\\$.
desc:REGEX
@@ -1069,20 +1114,20 @@ QUERIES
date:PERIODEXPR
match dates within the specified period. PERIODEXPR is a period
- expression (with no report interval). Examples: date:2016,
- date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the
- --date2 command line flag is present, this matches secondary
+ expression (with no report interval). Examples: date:2016,
+ date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the
+ --date2 command line flag is present, this matches secondary
dates instead.
date2:PERIODEXPR
match secondary dates within the specified period.
depth:N
- match (or display, depending on command) accounts at or above
+ match (or display, depending on command) accounts at or above
this depth
note:REGEX
- match transaction notes (part of description right of |, or
+ match transaction notes (part of description right of |, or
whole description when there's no |)
payee:REGEX
@@ -1096,51 +1141,51 @@ QUERIES
match unmarked, pending, or cleared transactions respectively
tag:REGEX[=REGEX]
- match by tag name, and optionally also by tag value. Note a
- tag: query is considered to match a transaction if it matches
- any of the postings. Also remember that postings inherit the
+ match by tag name, and optionally also by tag value. Note a
+ tag: query is considered to match a transaction if it matches
+ any of the postings. Also remember that postings inherit the
tags of their parent transaction.
The following special search term is used automatically in hledger-web,
only:
inacct:ACCTNAME
- tells hledger-web to show the transaction register for this ac-
+ tells hledger-web to show the transaction register for this ac-
count. Can be filtered further with acct etc.
Some of these can also be expressed as command-line options (eg depth:2
- is equivalent to --depth 2). Generally you can mix options and query
- arguments, and the resulting query will be their intersection (perhaps
+ is equivalent to --depth 2). Generally you can mix options and query
+ arguments, and the resulting query will be their intersection (perhaps
excluding the -p/--period option).
COMMANDS
- hledger provides a number of subcommands; hledger with no arguments
+ hledger provides a number of subcommands; hledger with no arguments
shows a list.
If you install additional hledger-* packages, or if you put programs or
- scripts named hledger-NAME in your PATH, these will also be listed as
+ scripts named hledger-NAME in your PATH, these will also be listed as
subcommands.
- Run a subcommand by writing its name as first argument (eg hledger in-
- comestatement). You can also write one of the standard short aliases
- displayed in parentheses in the command list (hledger b), or any any
+ Run a subcommand by writing its name as first argument (eg hledger in-
+ comestatement). You can also write one of the standard short aliases
+ displayed in parentheses in the command list (hledger b), or any any
unambiguous prefix of a command name (hledger inc).
- Here are all the builtin commands in alphabetical order. See also
- hledger for a more organised command list, and hledger CMD -h for de-
+ Here are all the builtin commands in alphabetical order. See also
+ hledger for a more organised command list, and hledger CMD -h for de-
tailed command help.
accounts
accounts, a
Show account names.
- This command lists account names, either declared with account direc-
- tives (--declared), posted to (--used), or both (the default). With
- query arguments, only matched account names and account names refer-
- enced by matched postings are shown. It shows a flat list by default.
- With --tree, it uses indentation to show the account hierarchy. In
- flat mode you can add --drop N to omit the first few account name com-
- ponents. Account names can be depth-clipped with depth:N or --depth N
+ This command lists account names, either declared with account direc-
+ tives (--declared), posted to (--used), or both (the default). With
+ query arguments, only matched account names and account names refer-
+ enced by matched postings are shown. It shows a flat list by default.
+ With --tree, it uses indentation to show the account hierarchy. In
+ flat mode you can add --drop N to omit the first few account name com-
+ ponents. Account names can be depth-clipped with depth:N or --depth N
or -N.
Examples:
@@ -1159,8 +1204,8 @@ COMMANDS
activity
Show an ascii barchart of posting counts per interval.
- The activity command displays an ascii histogram showing transaction
- counts by day, week, month or other reporting interval (by day is the
+ The activity command displays an ascii histogram showing transaction
+ counts by day, week, month or other reporting interval (by day is the
default). With query arguments, it counts only matched transactions.
Examples:
@@ -1175,22 +1220,22 @@ COMMANDS
add
Prompt for transactions and add them to the journal.
- Many hledger users edit their journals directly with a text editor, or
- generate them from CSV. For more interactive data entry, there is the
- add command, which prompts interactively on the console for new trans-
+ Many hledger users edit their journals directly with a text editor, or
+ generate them from CSV. For more interactive data entry, there is the
+ add command, which prompts interactively on the console for new trans-
actions, and appends them to the journal file (if there are multiple -f
- FILE options, the first file is used.) Existing transactions are not
- changed. This is the only hledger command that writes to the journal
+ FILE options, the first file is used.) Existing transactions are not
+ changed. This is the only hledger command that writes to the journal
file.
To use it, just run hledger add and follow the prompts. You can add as
- many transactions as you like; when you are finished, enter . or press
+ many transactions as you like; when you are finished, enter . or press
control-d or control-c to exit.
Features:
- o add tries to provide useful defaults, using the most similar (by de-
- scription) recent transaction (filtered by the query, if any) as a
+ o add tries to provide useful defaults, using the most similar (by de-
+ scription) recent transaction (filtered by the query, if any) as a
template.
o You can also set the initial defaults with command line arguments.
@@ -1198,20 +1243,20 @@ COMMANDS
o Readline-style edit keys can be used during data entry.
o The tab key will auto-complete whenever possible - accounts, descrip-
- tions, dates (yesterday, today, tomorrow). If the input area is
+ tions, dates (yesterday, today, tomorrow). If the input area is
empty, it will insert the default value.
- o If the journal defines a default commodity, it will be added to any
+ o If the journal defines a default commodity, it will be added to any
bare numbers entered.
o A parenthesised transaction code may be entered following a date.
o Comments and tags may be entered following a description or amount.
- o If you make a mistake, enter < at any prompt to restart the transac-
+ o If you make a mistake, enter < at any prompt to restart the transac-
tion.
- o Input prompts are displayed in a different colour when the terminal
+ o Input prompts are displayed in a different colour when the terminal
supports it.
Example (see the tutorial for a detailed explanation):
@@ -1241,8 +1286,8 @@ COMMANDS
Starting the next transaction (. or ctrl-D/ctrl-C to quit)
Date [2015/05/22]: <CTRL-D> $
- On Microsoft Windows, the add command makes sure that no part of the
- file path ends with a period, as it can cause data loss on that plat-
+ On Microsoft Windows, the add command makes sure that no part of the
+ file path ends with a period, as it can cause data loss on that plat-
form (cf #1056).
balance
@@ -1250,29 +1295,29 @@ COMMANDS
Show accounts and their balances.
The balance command is hledger's most versatile command. Note, despite
- the name, it is not always used for showing real-world account bal-
- ances; the more accounting-aware balancesheet and incomestatement may
+ the name, it is not always used for showing real-world account bal-
+ ances; the more accounting-aware balancesheet and incomestatement may
be more convenient for that.
By default, it displays all accounts, and each account's change in bal-
ance during the entire period of the journal. Balance changes are cal-
- culated by adding up the postings in each account. You can limit the
- postings matched, by a query, to see fewer accounts, changes over a
+ culated by adding up the postings in each account. You can limit the
+ postings matched, by a query, to see fewer accounts, changes over a
different time period, changes from only cleared transactions, etc.
If you include an account's complete history of postings in the report,
- the balance change is equivalent to the account's current ending bal-
- ance. For a real-world account, typically you won't have all transac-
+ the balance change is equivalent to the account's current ending bal-
+ ance. For a real-world account, typically you won't have all transac-
tions in the journal; instead you'll have all transactions after a cer-
- tain date, and an "opening balances" transaction setting the correct
- starting balance on that date. Then the balance command will show
+ tain date, and an "opening balances" transaction setting the correct
+ starting balance on that date. Then the balance command will show
real-world account balances. In some cases the -H/--historical flag is
used to ensure this (more below).
The balance command can produce several styles of report:
Classic balance report
- This is the original balance report, as found in Ledger. It usually
+ This is the original balance report, as found in Ledger. It usually
looks like this:
$ hledger balance
@@ -1290,22 +1335,22 @@ COMMANDS
0
By default, accounts are displayed hierarchically, with subaccounts in-
- dented below their parent. At each level of the tree, accounts are
- sorted by account code if any, then by account name. Or with
+ dented below their parent. At each level of the tree, accounts are
+ sorted by account code if any, then by account name. Or with
-S/--sort-amount, by their balance amount.
"Boring" accounts, which contain a single interesting subaccount and no
- balance of their own, are elided into the following line for more com-
- pact output. (Eg above, the "liabilities" account.) Use --no-elide to
+ balance of their own, are elided into the following line for more com-
+ pact output. (Eg above, the "liabilities" account.) Use --no-elide to
prevent this.
- Account balances are "inclusive" - they include the balances of any
+ Account balances are "inclusive" - they include the balances of any
subaccounts.
- Accounts which have zero balance (and no non-zero subaccounts) are
+ Accounts which have zero balance (and no non-zero subaccounts) are
omitted. Use -E/--empty to show them.
- A final total is displayed by default; use -N/--no-total to suppress
+ A final total is displayed by default; use -N/--no-total to suppress
it, eg:
$ hledger balance -p 2008/6 expenses --no-total
@@ -1314,7 +1359,7 @@ COMMANDS
$1 supplies
Customising the classic balance report
- You can customise the layout of classic balance reports with --format
+ You can customise the layout of classic balance reports with --format
FMT:
$ hledger balance --format "%20(account) %12(total)"
@@ -1332,7 +1377,7 @@ COMMANDS
0
The FMT format string (plus a newline) specifies the formatting applied
- to each account/balance pair. It may contain any suitable text, with
+ to each account/balance pair. It may contain any suitable text, with
data fields interpolated like so:
%[MIN][.MAX](FIELDNAME)
@@ -1343,14 +1388,14 @@ COMMANDS
o FIELDNAME must be enclosed in parentheses, and can be one of:
- o depth_spacer - a number of spaces equal to the account's depth, or
+ o depth_spacer - a number of spaces equal to the account's depth, or
if MIN is specified, MIN * depth spaces.
o account - the account's name
o total - the account's balance/posted total, right justified
- Also, FMT can begin with an optional prefix to control how multi-com-
+ Also, FMT can begin with an optional prefix to control how multi-com-
modity amounts are rendered:
o %_ - render on multiple lines, bottom-aligned (the default)
@@ -1367,14 +1412,14 @@ COMMANDS
o %(total) - the account's total
- o %-20.20(account) - the account's name, left justified, padded to 20
+ o %-20.20(account) - the account's name, left justified, padded to 20
characters and clipped at 20 characters
- o %,%-50(account) %25(total) - account name padded to 50 characters,
- total padded to 20 characters, with multiple commodities rendered on
+ o %,%-50(account) %25(total) - account name padded to 50 characters,
+ total padded to 20 characters, with multiple commodities rendered on
one line
- o %20(total) %2(depth_spacer)%-(account) - the default format for the
+ o %20(total) %2(depth_spacer)%-(account) - the default format for the
single-column balance report
Colour support
@@ -1385,9 +1430,9 @@ COMMANDS
o the output is not being redirected or piped anywhere
Flat mode
- To see a flat list instead of the default hierarchical display, use
- --flat. In this mode, accounts (unless depth-clipped) show their full
- names and "exclusive" balance, excluding any subaccount balances. In
+ To see a flat list instead of the default hierarchical display, use
+ --flat. In this mode, accounts (unless depth-clipped) show their full
+ names and "exclusive" balance, excluding any subaccount balances. In
this mode, you can also use --drop N to omit the first few account name
components.
@@ -1396,8 +1441,8 @@ COMMANDS
$1 supplies
Depth limited balance reports
- With --depth N or depth:N or just -N, balance reports show accounts
- only to the specified numeric depth. This is very useful to summarise
+ With --depth N or depth:N or just -N, balance reports show accounts
+ only to the specified numeric depth. This is very useful to summarise
a complex set of accounts and get an overview.
$ hledger balance -N -1
@@ -1410,17 +1455,17 @@ COMMANDS
inclusive balances at the depth limit.
Multicolumn balance report
- Multicolumn or tabular balance reports are a very useful hledger fea-
- ture, and usually the preferred style. They share many of the above
- features, but they show the report as a table, with columns represent-
- ing time periods. This mode is activated by providing a reporting in-
+ Multicolumn or tabular balance reports are a very useful hledger fea-
+ ture, and usually the preferred style. They share many of the above
+ features, but they show the report as a table, with columns represent-
+ ing time periods. This mode is activated by providing a reporting in-
terval.
- There are three types of multicolumn balance report, showing different
+ There are three types of multicolumn balance report, showing different
information:
1. By default: each column shows the sum of postings in that period, ie
- the account's change of balance in that period. This is useful eg
+ the account's change of balance in that period. This is useful eg
for a monthly income statement:
$ hledger balance --quarterly income expenses -E
@@ -1436,7 +1481,7 @@ COMMANDS
|| $-1 $1 0 0
2. With --cumulative: each column shows the ending balance for that pe-
- riod, accumulating the changes across periods, starting from 0 at
+ riod, accumulating the changes across periods, starting from 0 at
the report start date:
$ hledger balance --quarterly income expenses -E --cumulative
@@ -1452,8 +1497,8 @@ COMMANDS
|| $-1 0 0 0
3. With --historical/-H: each column shows the actual historical ending
- balance for that period, accumulating the changes across periods,
- starting from the actual balance at the report start date. This is
+ balance for that period, accumulating the changes across periods,
+ starting from the actual balance at the report start date. This is
useful eg for a multi-period balance sheet, and when you are showing
only the data after a certain start date:
@@ -1472,26 +1517,26 @@ COMMANDS
Note that --cumulative or --historical/-H disable --row-total/-T, since
summing end balances generally does not make sense.
- Multicolumn balance reports display accounts in flat mode by default;
+ Multicolumn balance reports display accounts in flat mode by default;
to see the hierarchy, use --tree.
- With a reporting interval (like --quarterly above), the report
- start/end dates will be adjusted if necessary so that they encompass
+ With a reporting interval (like --quarterly above), the report
+ start/end dates will be adjusted if necessary so that they encompass
the displayed report periods. This is so that the first and last peri-
ods will be "full" and comparable to the others.
- The -E/--empty flag does two things in multicolumn balance reports:
+ The -E/--empty flag does two things in multicolumn balance reports:
first, the report will show all columns within the specified report pe-
- riod (without -E, leading and trailing columns with all zeroes are not
- shown). Second, all accounts which existed at the report start date
- will be considered, not just the ones with activity during the report
- period (use -E to include low-activity accounts which would otherwise
+ riod (without -E, leading and trailing columns with all zeroes are not
+ shown). Second, all accounts which existed at the report start date
+ will be considered, not just the ones with activity during the report
+ period (use -E to include low-activity accounts which would otherwise
would be omitted).
The -T/--row-total flag adds an additional column showing the total for
each row.
- The -A/--average flag adds a column showing the average value in each
+ The -A/--average flag adds a column showing the average value in each
row.
Here's an example of all three:
@@ -1515,20 +1560,20 @@ COMMANDS
Limitations:
In multicolumn reports the -V/--value flag uses the market price on the
- report end date, for all columns (not the price on each column's end
+ report end date, for all columns (not the price on each column's end
date).
- Eliding of boring parent accounts in tree mode, as in the classic bal-
+ Eliding of boring parent accounts in tree mode, as in the classic bal-
ance report, is not yet supported in multicolumn reports.
Budget report
- With --budget, extra columns are displayed showing budget goals for
- each account and period, if any. Budget goals are defined by periodic
+ With --budget, extra columns are displayed showing budget goals for
+ each account and period, if any. Budget goals are defined by periodic
transactions. This is very useful for comparing planned and actual in-
- come, expenses, time usage, etc. --budget is most often combined with
+ come, expenses, time usage, etc. --budget is most often combined with
a report interval.
- For example, you can take average monthly expenses in the common ex-
+ For example, you can take average monthly expenses in the common ex-
pense categories to construct a minimal monthly budget:
;; Budget
@@ -1575,25 +1620,25 @@ COMMANDS
Note this is different from a normal balance report in several ways:
- o Only accounts with budget goals during the report period are shown,
+ o Only accounts with budget goals during the report period are shown,
by default.
- o In each column, in square brackets after the actual amount, budgeted
+ o In each column, in square brackets after the actual amount, budgeted
amounts are shown, along with the percentage of budget used.
- o All parent accounts are always shown, even in flat mode. Eg assets,
+ o All parent accounts are always shown, even in flat mode. Eg assets,
assets:bank, and expenses above.
- o Amounts always include all subaccounts, budgeted or unbudgeted, even
+ o Amounts always include all subaccounts, budgeted or unbudgeted, even
in flat mode.
This means that the numbers displayed will not always add up! Eg above,
- the expenses actual amount includes the gifts and supplies transac-
- tions, but the expenses:gifts and expenses:supplies accounts are not
+ the expenses actual amount includes the gifts and supplies transac-
+ tions, but the expenses:gifts and expenses:supplies accounts are not
shown, as they have no budget amounts declared.
- This can be confusing. When you need to make things clearer, use the
- -E/--empty flag, which will reveal all accounts including unbudgeted
+ This can be confusing. When you need to make things clearer, use the
+ -E/--empty flag, which will reveal all accounts including unbudgeted
ones, giving the full picture. Eg:
$ hledger balance -M --budget --empty
@@ -1635,12 +1680,12 @@ COMMANDS
For more examples, see Budgeting and Forecasting.
Nested budgets
- You can add budgets to any account in your account hierarchy. If you
+ You can add budgets to any account in your account hierarchy. If you
have budgets on both parent account and some of its children, then bud-
- get(s) of the child account(s) would be added to the budget of their
+ get(s) of the child account(s) would be added to the budget of their
parent, much like account balances behave.
- In the most simple case this means that once you add a budget to any
+ In the most simple case this means that once you add a budget to any
account, all its parents would have budget as well.
To illustrate this, consider the following budget:
@@ -1650,13 +1695,13 @@ COMMANDS
expenses:personal:electronics $100.00
liabilities
- With this, monthly budget for electronics is defined to be $100 and
- budget for personal expenses is an additional $1000, which implicity
+ With this, monthly budget for electronics is defined to be $100 and
+ budget for personal expenses is an additional $1000, which implicity
means that budget for both expenses:personal and expenses is $1100.
- Transactions in expenses:personal:electronics will be counted both to-
+ Transactions in expenses:personal:electronics will be counted both to-
wards its $100 budget and $1100 of expenses:personal , and transactions
- in any other subaccount of expenses:personal would be counted towards
+ in any other subaccount of expenses:personal would be counted towards
only towards the budget of expenses:personal.
For example, let's consider these transactions:
@@ -1682,9 +1727,9 @@ COMMANDS
expenses:personal $30.00
liabilities
- As you can see, we have transactions in expenses:personal:electron-
- ics:upgrades and expenses:personal:train tickets, and since both of
- these accounts are without explicitly defined budget, these transac-
+ As you can see, we have transactions in expenses:personal:electron-
+ ics:upgrades and expenses:personal:train tickets, and since both of
+ these accounts are without explicitly defined budget, these transac-
tions would be counted towards budgets of expenses:personal:electronics
and expenses:personal accordingly:
@@ -1700,7 +1745,7 @@ COMMANDS
-------------------------------++-------------------------------
|| 0 [ 0]
- And with --empty, we can get a better picture of budget allocation and
+ And with --empty, we can get a better picture of budget allocation and
consumption:
$ hledger balance --budget -M --empty
@@ -1718,17 +1763,17 @@ COMMANDS
|| 0 [ 0]
Output format
- The balance command supports output destination and output format se-
+ The balance command supports output destination and output format se-
lection.
balancesheet
balancesheet, bs
This command displays a simple balance sheet, showing historical ending
- balances of asset and liability accounts (ignoring any report begin
- date). It assumes that these accounts are under a top-level asset or
+ balances of asset and liability accounts (ignoring any report begin
+ date). It assumes that these accounts are under a top-level asset or
liability account (case insensitive, plural forms also allowed).
- Note this report shows all account balances with normal positive sign
+ Note this report shows all account balances with normal positive sign
(like conventional financial statements, unlike balance/print/register)
(experimental).
@@ -1754,19 +1799,19 @@ COMMANDS
0
With a reporting interval, multiple columns will be shown, one for each
- report period. As with multicolumn balance reports, you can alter the
- report mode with --change/--cumulative/--historical. Normally bal-
- ancesheet shows historical ending balances, which is what you need for
- a balance sheet; note this means it ignores report begin dates (and
- -T/--row-total, since summing end balances generally does not make
+ report period. As with multicolumn balance reports, you can alter the
+ report mode with --change/--cumulative/--historical. Normally bal-
+ ancesheet shows historical ending balances, which is what you need for
+ a balance sheet; note this means it ignores report begin dates (and
+ -T/--row-total, since summing end balances generally does not make
sense).
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
balancesheetequity
balancesheetequity, bse
- Just like balancesheet, but also reports Equity (which it assumes is
+ Just like balancesheet, but also reports Equity (which it assumes is
under a top-level equity account).
Example:
@@ -1797,10 +1842,10 @@ COMMANDS
cashflow
cashflow, cf
- This command displays a simple cashflow statement, showing changes in
- "cash" accounts. It assumes that these accounts are under a top-level
- asset account (case insensitive, plural forms also allowed) and do not
- contain receivable or A/R in their name. Note this report shows all
+ This command displays a simple cashflow statement, showing changes in
+ "cash" accounts. It assumes that these accounts are under a top-level
+ asset account (case insensitive, plural forms also allowed) and do not
+ contain receivable or A/R in their name. Note this report shows all
account balances with normal positive sign (like conventional financial
statements, unlike balance/print/register) (experimental).
@@ -1821,81 +1866,81 @@ COMMANDS
$-1
With a reporting interval, multiple columns will be shown, one for each
- report period. Normally cashflow shows changes in assets per period,
- though as with multicolumn balance reports you can alter the report
+ report period. Normally cashflow shows changes in assets per period,
+ though as with multicolumn balance reports you can alter the report
mode with --change/--cumulative/--historical.
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
check-dates
check-dates
- Check that transactions are sorted by increasing date. With --date2,
- checks secondary dates instead. With --strict, dates must also be
- unique. With a query, only matched transactions' dates are checked.
+ Check that transactions are sorted by increasing date. With --date2,
+ checks secondary dates instead. With --strict, dates must also be
+ unique. With a query, only matched transactions' dates are checked.
Reads the default journal file, or another specified with -f.
check-dupes
check-dupes
- Reports account names having the same leaf but different prefixes. In
- other words, two or more leaves that are categorized differently.
+ Reports account names having the same leaf but different prefixes. In
+ other words, two or more leaves that are categorized differently.
Reads the default journal file, or another specified as an argument.
An example: http://stefanorodighiero.net/software/hledger-dupes.html
close
close, equity
- Prints a "closing balances" transaction and an "opening balances"
+ Prints a "closing balances" transaction and an "opening balances"
transaction that bring account balances to and from zero, respectively.
Useful for bringing asset/liability balances forward into a new journal
- file, or for closing out revenues/expenses to retained earnings at the
+ file, or for closing out revenues/expenses to retained earnings at the
end of a period.
- The closing transaction transfers balances to "equity:closing bal-
- ances". The opening transaction transfers balances from "equity:open-
+ The closing transaction transfers balances to "equity:closing bal-
+ ances". The opening transaction transfers balances from "equity:open-
ing balances". You can choose to print just one of the transactions by
using the --opening or --closing flag.
If you split your journal files by time (eg yearly), you will typically
- run this command at the end of the year, and save the closing transac-
- tion as last entry of the old file, and the opening transaction as the
- first entry of the new file. This makes the files self contained, so
- that correct balances are reported no matter which of them are loaded.
- Ie, if you load just one file, the balances are initialised correctly;
- or if you load several files, the redundant closing/opening transac-
- tions cancel each other out. (They will show up in print or register
- reports; you can exclude them with a query like not:desc:'(open-
+ run this command at the end of the year, and save the closing transac-
+ tion as last entry of the old file, and the opening transaction as the
+ first entry of the new file. This makes the files self contained, so
+ that correct balances are reported no matter which of them are loaded.
+ Ie, if you load just one file, the balances are initialised correctly;
+ or if you load several files, the redundant closing/opening transac-
+ tions cancel each other out. (They will show up in print or register
+ reports; you can exclude them with a query like not:desc:'(open-
ing|closing) balances'.)
If you're running a business, you might also use this command to "close
- the books" at the end of an accounting period, transferring income
- statement account balances to retained earnings. (You may want to
+ the books" at the end of an accounting period, transferring income
+ statement account balances to retained earnings. (You may want to
change the equity account name to something like "equity:retained earn-
ings".)
- By default, the closing transaction is dated yesterday, the balances
- are calculated as of end of yesterday, and the opening transaction is
- dated today. To close on some other date, use: hledger close -e OPEN-
- INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019.
+ By default, the closing transaction is dated yesterday, the balances
+ are calculated as of end of yesterday, and the opening transaction is
+ dated today. To close on some other date, use: hledger close -e OPEN-
+ INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019.
You can also use -p or date:PERIOD (any starting date is ignored).
- Both transactions will include balance assertions for the closed/re-
+ Both transactions will include balance assertions for the closed/re-
opened accounts. You probably shouldn't use status or realness filters
- (like -C or -R or status:) with this command, or the generated balance
- assertions will depend on these flags. Likewise, if you run this com-
- mand with --auto, the balance assertions will probably always require
+ (like -C or -R or status:) with this command, or the generated balance
+ assertions will depend on these flags. Likewise, if you run this com-
+ mand with --auto, the balance assertions will probably always require
--auto.
- When account balances have cost information (transaction prices), the
- closing/opening transactions will preserve it, so that eg balance -B
+ When account balances have cost information (transaction prices), the
+ closing/opening transactions will preserve it, so that eg balance -B
reports will not be affected.
Examples:
- Carrying asset/liability balances into a new file for 2019, all from
+ Carrying asset/liability balances into a new file for 2019, all from
command line:
- Warning: we use >> here to append; be careful not to type a single >
+ Warning: we use >> here to append; be careful not to type a single >
which would wipe your journal!
$ hledger close -f 2018.journal -e 2019 assets liabilities --opening >>2019.journal
@@ -1944,18 +1989,18 @@ COMMANDS
diff
diff
- Compares a particular account's transactions in two input files. It
+ Compares a particular account's transactions in two input files. It
shows any transactions to this account which are in one file but not in
the other.
More precisely, for each posting affecting this account in either file,
- it looks for a corresponding posting in the other file which posts the
- same amount to the same account (ignoring date, description, etc.)
+ it looks for a corresponding posting in the other file which posts the
+ same amount to the same account (ignoring date, description, etc.)
Since postings not transactions are compared, this also works when mul-
tiple bank transactions have been combined into a single journal entry.
This is useful eg if you have downloaded an account's transactions from
- your bank (eg as CSV data). When hledger and your bank disagree about
+ your bank (eg as CSV data). When hledger and your bank disagree about
the account balance, you can compare the bank data with your journal to
find out the cause.
@@ -1973,20 +2018,20 @@ COMMANDS
files
files
- List all files included in the journal. With a REGEX argument, only
+ List all files included in the journal. With a REGEX argument, only
file names matching the regular expression (case sensitive) are shown.
help
help
Show any of the hledger manuals.
- The help command displays any of the main hledger manuals, in one of
- several ways. Run it with no argument to list the manuals, or provide
+ The help command displays any of the main hledger manuals, in one of
+ several ways. Run it with no argument to list the manuals, or provide
a full or partial manual name to select one.
- hledger manuals are available in several formats. hledger help will
- use the first of these display methods that it finds: info, man,
- $PAGER, less, stdout (or when non-interactive, just stdout). You can
+ hledger manuals are available in several formats. hledger help will
+ use the first of these display methods that it finds: info, man,
+ $PAGER, less, stdout (or when non-interactive, just stdout). You can
force a particular viewer with the --info, --man, --pager, --cat flags.
Examples:
@@ -2013,8 +2058,8 @@ COMMANDS
import
import
- Read new transactions added to each FILE since last run, and add them
- to the main journal file. Or with --dry-run, just print the transac-
+ Read new transactions added to each FILE since last run, and add them
+ to the main journal file. Or with --dry-run, just print the transac-
tions that would be added.
The input files are specified as arguments - no need to write -f before
@@ -2025,36 +2070,36 @@ COMMANDS
ing transactions are always added to the input files in increasing date
order, and by saving .latest.FILE state files.
- The --dry-run output is in journal format, so you can filter it, eg to
+ The --dry-run output is in journal format, so you can filter it, eg to
see only uncategorised transactions:
$ hledger import --dry ... | hledger -f- print unknown --ignore-assertions
Importing balance assignments
- Entries added by import will have their posting amounts made explicit
- (like hledger print -x). This means that any balance assignments in
- imported files must be evaluated; but, imported files don't get to see
- the main file's account balances. As a result, importing entries with
+ Entries added by import will have their posting amounts made explicit
+ (like hledger print -x). This means that any balance assignments in
+ imported files must be evaluated; but, imported files don't get to see
+ the main file's account balances. As a result, importing entries with
balance assignments (eg from an institution that provides only balances
- and not posting amounts) will probably generate incorrect posting
+ and not posting amounts) will probably generate incorrect posting
amounts. To avoid this problem, use print instead of import:
$ hledger print IMPORTFILE [--new] >> $LEDGER_FILE
- (If you think import should leave amounts implicit like print does,
+ (If you think import should leave amounts implicit like print does,
please test it and send a pull request.)
incomestatement
incomestatement, is
- This command displays a simple income statement, showing revenues and
- expenses during a period. It assumes that these accounts are under a
- top-level revenue or income or expense account (case insensitive, plu-
- ral forms also allowed). Note this report shows all account balances
- with normal positive sign (like conventional financial statements, un-
+ This command displays a simple income statement, showing revenues and
+ expenses during a period. It assumes that these accounts are under a
+ top-level revenue or income or expense account (case insensitive, plu-
+ ral forms also allowed). Note this report shows all account balances
+ with normal positive sign (like conventional financial statements, un-
like balance/print/register) (experimental).
- This command displays a simple income statement. It currently assumes
- that you have top-level accounts named income (or revenue) and expense
+ This command displays a simple income statement. It currently assumes
+ that you have top-level accounts named income (or revenue) and expense
(plural forms also allowed.)
$ hledger incomestatement
@@ -2079,11 +2124,11 @@ COMMANDS
0
With a reporting interval, multiple columns will be shown, one for each
- report period. Normally incomestatement shows revenues/expenses per
- period, though as with multicolumn balance reports you can alter the
+ report period. Normally incomestatement shows revenues/expenses per
+ period, though as with multicolumn balance reports you can alter the
report mode with --change/--cumulative/--historical.
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
notes
@@ -2111,9 +2156,9 @@ COMMANDS
prices
prices
- Print market price directives from the journal. With --costs, also
- print synthetic market prices based on transaction prices. With --in-
- verted-costs, also print inverse prices based on transaction prices.
+ Print market price directives from the journal. With --costs, also
+ print synthetic market prices based on transaction prices. With --in-
+ verted-costs, also print inverse prices based on transaction prices.
Prices (and postings providing prices) can be filtered by a query.
print
@@ -2121,11 +2166,11 @@ COMMANDS
Show transaction journal entries, sorted by date.
The print command displays full journal entries (transactions) from the
- journal file in date order, tidily formatted. With --date2, transac-
+ journal file in date order, tidily formatted. With --date2, transac-
tions are sorted by secondary date instead.
print's output is always a valid hledger journal.
- It preserves all transaction information, but it does not preserve di-
+ It preserves all transaction information, but it does not preserve di-
rectives or inter-transaction comments
$ hledger print
@@ -2151,39 +2196,39 @@ COMMANDS
assets:bank:checking $-1
Normally, the journal entry's explicit or implicit amount style is pre-
- served. Ie when an amount is omitted in the journal, it will be omit-
- ted in the output. You can use the -x/--explicit flag to make all
+ served. Ie when an amount is omitted in the journal, it will be omit-
+ ted in the output. You can use the -x/--explicit flag to make all
amounts explicit, which can be useful for troubleshooting or for making
your journal more readable and robust against data entry errors. Note,
- -x will cause postings with a multi-commodity amount (these can arise
- when a multi-commodity transaction has an implicit amount) will be
- split into multiple single-commodity postings, for valid journal out-
+ -x will cause postings with a multi-commodity amount (these can arise
+ when a multi-commodity transaction has an implicit amount) will be
+ split into multiple single-commodity postings, for valid journal out-
put.
- With -B/--cost, amounts with transaction prices are converted to cost
+ With -B/--cost, amounts with transaction prices are converted to cost
using that price. This can be used for troubleshooting.
- With -m/--match and a STR argument, print will show at most one trans-
- action: the one one whose description is most similar to STR, and is
- most recent. STR should contain at least two characters. If there is
+ With -m/--match and a STR argument, print will show at most one trans-
+ action: the one one whose description is most similar to STR, and is
+ most recent. STR should contain at least two characters. If there is
no similar-enough match, no transaction will be shown.
With --new, for each FILE being read, hledger reads (and writes) a spe-
- cial state file (.latest.FILE in the same directory), containing the
- latest transaction date(s) that were seen last time FILE was read.
- When this file is found, only transactions with newer dates (and new
- transactions on the latest date) are printed. This is useful for ig-
- noring already-seen entries in import data, such as downloaded CSV
+ cial state file (.latest.FILE in the same directory), containing the
+ latest transaction date(s) that were seen last time FILE was read.
+ When this file is found, only transactions with newer dates (and new
+ transactions on the latest date) are printed. This is useful for ig-
+ noring already-seen entries in import data, such as downloaded CSV
files. Eg:
$ hledger -f bank1.csv print --new
# shows transactions added since last print --new on this file
- This assumes that transactions added to FILE always have same or in-
- creasing dates, and that transactions on the same day do not get re-
+ This assumes that transactions added to FILE always have same or in-
+ creasing dates, and that transactions on the same day do not get re-
ordered. See also the import command.
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion. Here's an example of print's CSV output:
$ hledger print -Ocsv
@@ -2200,20 +2245,20 @@ COMMANDS
"5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","",""
"5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","",""
- o There is one CSV record per posting, with the parent transaction's
+ o There is one CSV record per posting, with the parent transaction's
fields repeated.
o The "txnidx" (transaction index) field shows which postings belong to
- the same transaction. (This number might change if transactions are
- reordered within the file, files are parsed/included in a different
+ the same transaction. (This number might change if transactions are
+ reordered within the file, files are parsed/included in a different
order, etc.)
- o The amount is separated into "commodity" (the symbol) and "amount"
+ o The amount is separated into "commodity" (the symbol) and "amount"
(numeric quantity) fields.
o The numeric amount is repeated in either the "credit" or "debit" col-
- umn, for convenience. (Those names are not accurate in the account-
- ing sense; it just puts negative amounts under credit and zero or
+ umn, for convenience. (Those names are not accurate in the account-
+ ing sense; it just puts negative amounts under credit and zero or
greater amounts under debit.)
print-unique
@@ -2237,7 +2282,7 @@ COMMANDS
Show postings and their running total.
The register command displays postings in date order, one per line, and
- their running total. This is typically used with a query selecting a
+ their running total. This is typically used with a query selecting a
particular account, to see that account's activity:
$ hledger register checking
@@ -2248,8 +2293,8 @@ COMMANDS
With --date2, it shows and sorts by secondary date instead.
- The --historical/-H flag adds the balance from any undisplayed prior
- postings to the running total. This is useful when you want to see
+ The --historical/-H flag adds the balance from any undisplayed prior
+ postings to the running total. This is useful when you want to see
only recent activity, with a historically accurate running balance:
$ hledger register checking -b 2008/6 --historical
@@ -2259,18 +2304,18 @@ COMMANDS
The --depth option limits the amount of sub-account detail displayed.
- The --average/-A flag shows the running average posting amount instead
+ The --average/-A flag shows the running average posting amount instead
of the running total (so, the final number displayed is the average for
- the whole report period). This flag implies --empty (see below). It
- is affected by --historical. It works best when showing just one ac-
+ the whole report period). This flag implies --empty (see below). It
+ is affected by --historical. It works best when showing just one ac-
count and one commodity.
- The --related/-r flag shows the other postings in the transactions of
+ The --related/-r flag shows the other postings in the transactions of
the postings which would normally be shown.
- The --invert flag negates all amounts. For example, it can be used on
+ The --invert flag negates all amounts. For example, it can be used on
an income account where amounts are normally displayed as negative num-
- bers. It's also useful to show postings on the checking account to-
+ bers. It's also useful to show postings on the checking account to-
gether with the related account:
$ hledger register --related --invert assets:checking
@@ -2282,7 +2327,7 @@ COMMANDS
2008/01 income:salary $-1 $-1
2008/06 income:gifts $-1 $-2
- Periods with no activity, and summary postings with a zero amount, are
+ Periods with no activity, and summary postings with a zero amount, are
not shown by default; use the --empty/-E flag to see them:
$ hledger register --monthly income -E
@@ -2299,7 +2344,7 @@ COMMANDS
2008/11 0 $-2
2008/12 0 $-2
- Often, you'll want to see just one line per interval. The --depth op-
+ Often, you'll want to see just one line per interval. The --depth op-
tion helps with this, causing subaccounts to be aggregated:
$ hledger register --monthly assets --depth 1h
@@ -2307,17 +2352,17 @@ COMMANDS
2008/06 assets $-1 0
2008/12 assets $-1 $-1
- Note when using report intervals, if you specify start/end dates these
- will be adjusted outward if necessary to contain a whole number of in-
- tervals. This ensures that the first and last intervals are full
+ Note when using report intervals, if you specify start/end dates these
+ will be adjusted outward if necessary to contain a whole number of in-
+ tervals. This ensures that the first and last intervals are full
length and comparable to the others in the report.
Custom register output
- register uses the full terminal width by default, except on windows.
- You can override this by setting the COLUMNS environment variable (not
+ register uses the full terminal width by default, except on windows.
+ You can override this by setting the COLUMNS environment variable (not
a bash shell variable) or by using the --width/-w option.
- The description and account columns normally share the space equally
+ The description and account columns normally share the space equally
(about half of (width - 40) each). You can adjust this by adding a de-
scription width as part of --width's argument, comma-separated: --width
W,D . Here's a diagram (won't display correctly in --help):
@@ -2335,27 +2380,27 @@ COMMANDS
$ hledger reg -w 100,40 # set overall width 100, description width 40
$ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
register-match
register-match
Print the one posting whose transaction description is closest to DESC,
- in the style of the register command. If there are multiple equally
- good matches, it shows the most recent. Query options (options, not
- arguments) can be used to restrict the search space. Helps ledger-au-
+ in the style of the register command. If there are multiple equally
+ good matches, it shows the most recent. Query options (options, not
+ arguments) can be used to restrict the search space. Helps ledger-au-
tosync detect already-seen transactions when importing.
rewrite
rewrite
Print all transactions, rewriting the postings of matched transactions.
- For now the only rewrite available is adding new postings, like print
+ For now the only rewrite available is adding new postings, like print
--auto.
This is a start at a generic rewriter of transaction entries. It reads
- the default journal and prints the transactions, like print, but adds
+ the default journal and prints the transactions, like print, but adds
one or more specified postings to any transactions matching QUERY. The
- posting amounts can be fixed, or a multiplier of the existing transac-
+ posting amounts can be fixed, or a multiplier of the existing transac-
tion's first posting amount.
Examples:
@@ -2371,7 +2416,7 @@ COMMANDS
(reserve:grocery) *0.25 ; reserve 25% for grocery
(reserve:) *0.25 ; reserve 25% for grocery
- Note the single quotes to protect the dollar sign from bash, and the
+ Note the single quotes to protect the dollar sign from bash, and the
two spaces between account and amount.
More:
@@ -2381,16 +2426,16 @@ COMMANDS
$ hledger rewrite -- expenses:gifts --add-posting '(budget:gifts) *-1"'
$ hledger rewrite -- ^income --add-posting '(budget:foreign currency) *0.25 JPY; diversify'
- Argument for --add-posting option is a usual posting of transaction
- with an exception for amount specification. More precisely, you can
+ Argument for --add-posting option is a usual posting of transaction
+ with an exception for amount specification. More precisely, you can
use '*' (star symbol) before the amount to indicate that that this is a
- factor for an amount of original matched posting. If the amount in-
+ factor for an amount of original matched posting. If the amount in-
cludes a commodity name, the new posting amount will be in the new com-
- modity; otherwise, it will be in the matched posting amount's commod-
+ modity; otherwise, it will be in the matched posting amount's commod-
ity.
Re-write rules in a file
- During the run this tool will execute so called "Automated Transac-
+ During the run this tool will execute so called "Automated Transac-
tions" found in any journal it process. I.e instead of specifying this
operations in command line you can put them in a journal file.
@@ -2405,7 +2450,7 @@ COMMANDS
budget:gifts *-1
assets:budget *1
- Note that '=' (equality symbol) that is used instead of date in trans-
+ Note that '=' (equality symbol) that is used instead of date in trans-
actions you usually write. It indicates the query by which you want to
match the posting to add new ones.
@@ -2418,12 +2463,12 @@ COMMANDS
--add-posting 'assets:budget *1' \
> rewritten-tidy-output.journal
- It is important to understand that relative order of such entries in
- journal is important. You can re-use result of previously added post-
+ It is important to understand that relative order of such entries in
+ journal is important. You can re-use result of previously added post-
ings.
Diff output format
- To use this tool for batch modification of your journal files you may
+ To use this tool for batch modification of your journal files you may
find useful output in form of unified diff.
$ hledger rewrite -- --diff -f examples/sample.journal '^income' --add-posting '(liabilities:tax) *.33'
@@ -2447,10 +2492,10 @@ COMMANDS
If you'll pass this through patch tool you'll get transactions contain-
ing the posting that matches your query be updated. Note that multiple
- files might be update according to list of input files specified via
+ files might be update according to list of input files specified via
--file options and include directives inside of these files.
- Be careful. Whole transaction being re-formatted in a style of output
+ Be careful. Whole transaction being re-formatted in a style of output
from hledger print.
See also:
@@ -2458,48 +2503,48 @@ COMMANDS
https://github.com/simonmichael/hledger/issues/99
rewrite vs. print --auto
- This command predates print --auto, and currently does much the same
+ This command predates print --auto, and currently does much the same
thing, but with these differences:
- o with multiple files, rewrite lets rules in any file affect all other
- files. print --auto uses standard directive scoping; rules affect
+ o with multiple files, rewrite lets rules in any file affect all other
+ files. print --auto uses standard directive scoping; rules affect
only child files.
- o rewrite's query limits which transactions can be rewritten; all are
+ o rewrite's query limits which transactions can be rewritten; all are
printed. print --auto's query limits which transactions are printed.
- o rewrite applies rules specified on command line or in the journal.
+ o rewrite applies rules specified on command line or in the journal.
print --auto applies rules specified in the journal.
roi
roi
- Shows the time-weighted (TWR) and money-weighted (IRR) rate of return
+ Shows the time-weighted (TWR) and money-weighted (IRR) rate of return
on your investments.
- This command assumes that you have account(s) that hold nothing but
+ This command assumes that you have account(s) that hold nothing but
your investments and whenever you record current appraisal/valuation of
these investments you offset unrealized profit and loss into account(s)
that, again, hold nothing but unrealized profit and loss.
- Any transactions affecting balance of investment account(s) and not
- originating from unrealized profit and loss account(s) are assumed to
+ Any transactions affecting balance of investment account(s) and not
+ originating from unrealized profit and loss account(s) are assumed to
be your investments or withdrawals.
- At a minimum, you need to supply a query (which could be just an ac-
+ At a minimum, you need to supply a query (which could be just an ac-
count name) to select your investments with --inv, and another query to
identify your profit and loss transactions with --pnl.
- It will compute and display the internalized rate of return (IRR) and
- time-weighted rate of return (TWR) for your investments for the time
- period requested. Both rates of return are annualized before display,
+ It will compute and display the internalized rate of return (IRR) and
+ time-weighted rate of return (TWR) for your investments for the time
+ period requested. Both rates of return are annualized before display,
regardless of the length of reporting interval.
stats
stats
Show some journal statistics.
- The stats command displays summary information for the whole journal,
- or a matched part of it. With a reporting interval, it shows a report
+ The stats command displays summary information for the whole journal,
+ or a matched part of it. With a reporting interval, it shows a report
for each report period.
Example:
@@ -2517,14 +2562,14 @@ COMMANDS
Commodities : 1 ($)
Market prices : 12 ($)
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
tags
tags
- List all the tag names used in the journal. With a TAGREGEX argument,
- only tag names matching the regular expression (case insensitive) are
- shown. With QUERY arguments, only transactions matching the query are
+ List all the tag names used in the journal. With a TAGREGEX argument,
+ only tag names matching the regular expression (case insensitive) are
+ shown. With QUERY arguments, only transactions matching the query are
considered. With --values flag, the tags' unique values are listed in-
stead.
@@ -2532,46 +2577,46 @@ COMMANDS
test
Run built-in unit tests.
- This command runs the unit tests built in to hledger-lib and hledger,
+ This command runs the unit tests built in to hledger-lib and hledger,
printing test names and results on stdout. If any test fails, the exit
code will be non-zero.
- Test names include a group prefix. If a (exact, case sensitive) group
- prefix, or a full test name is provided as the first argument, only
+ Test names include a group prefix. If a (exact, case sensitive) group
+ prefix, or a full test name is provided as the first argument, only
that group or test is run.
- If a numeric second argument is provided, it will set the randomness
- seed, for repeatable results from tests using randomness (currently
+ If a numeric second argument is provided, it will set the randomness
+ seed, for repeatable results from tests using randomness (currently
none of them).
- This is mainly used by developers, but it's nice to be able to sanity-
+ This is mainly used by developers, but it's nice to be able to sanity-
check your installed hledger executable at any time. All tests are ex-
- pected to pass - if you ever see otherwise, something has gone wrong,
+ pected to pass - if you ever see otherwise, something has gone wrong,
please report a bug!
ADD-ON COMMANDS
- hledger also searches for external add-on commands, and will include
+ hledger also searches for external add-on commands, and will include
these in the commands list. These are programs or scripts in your PATH
- whose name starts with hledger- and ends with a recognised file exten-
+ whose name starts with hledger- and ends with a recognised file exten-
sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).
- Add-ons can be invoked like any hledger command, but there are a few
+ Add-ons can be invoked like any hledger command, but there are a few
things to be aware of. Eg if the hledger-web add-on is installed,
- o hledger -h web shows hledger's help, while hledger web -h shows
+ o hledger -h web shows hledger's help, while hledger web -h shows
hledger-web's help.
- o Flags specific to the add-on must have a preceding -- to hide them
- from hledger. So hledger web --serve --port 9000 will be rejected;
+ o Flags specific to the add-on must have a preceding -- to hide them
+ from hledger. So hledger web --serve --port 9000 will be rejected;
you must use hledger web -- --serve --port 9000.
o You can always run add-ons directly if preferred: hledger-web --serve
--port 9000.
- Add-ons are a relatively easy way to add local features or experiment
- with new ideas. They can be written in any language, but haskell
- scripts have a big advantage: they can use the same hledger (and
- haskell) library functions that built-in commands do, for command-line
+ Add-ons are a relatively easy way to add local features or experiment
+ with new ideas. They can be written in any language, but haskell
+ scripts have a big advantage: they can use the same hledger (and
+ haskell) library functions that built-in commands do, for command-line
options, journal parsing, reporting, etc.
Here are some hledger add-ons available:
@@ -2589,7 +2634,7 @@ ADD-ON COMMANDS
hledger-web provides a simple web interface.
Third party add-ons
- These are maintained separately, and usually updated shortly after a
+ These are maintained separately, and usually updated shortly after a
hledger release.
diff
@@ -2597,7 +2642,7 @@ ADD-ON COMMANDS
journal file and another.
iadd
- hledger-iadd is a curses-style, more interactive replacement for the
+ hledger-iadd is a curses-style, more interactive replacement for the
add command.
interest
@@ -2609,15 +2654,15 @@ ADD-ON COMMANDS
count, but it's superseded now by the built-in roi command.
Experimental add-ons
- These are available in source form in the hledger repo's bin/ direc-
+ These are available in source form in the hledger repo's bin/ direc-
tory; installing them is pretty easy. They may be less mature and doc-
- umented than built-in commands. Reading and tweaking these is a good
+ umented than built-in commands. Reading and tweaking these is a good
way to start making your own!
autosync
hledger-autosync is a symbolic link for easily running ledger-autosync,
- if installed. ledger-autosync does deduplicating conversion of OFX
- data and some CSV formats, and can also download the data if your bank
+ if installed. ledger-autosync does deduplicating conversion of OFX
+ data and some CSV formats, and can also download the data if your bank
offers OFX Direct Connect.
chart
@@ -2627,21 +2672,21 @@ ADD-ON COMMANDS
hledger-check.hs checks more powerful account balance assertions.
ENVIRONMENT
- COLUMNS The screen width used by the register command. Default: the
+ COLUMNS The screen width used by the register command. Default: the
full terminal width.
LEDGER_FILE The journal file path when not specified with -f. Default:
- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
+ ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
FILES
- Reads data from one or more files in hledger journal, timeclock, time-
- dot, or CSV format specified with -f, or $LEDGER_FILE, or
- $HOME/.hledger.journal (on windows, perhaps
+ Reads data from one or more files in hledger journal, timeclock, time-
+ dot, or CSV format specified with -f, or $LEDGER_FILE, or
+ $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
LIMITATIONS
- The need to precede addon command options with -- when invoked from
+ The need to precede addon command options with -- when invoked from
hledger is awkward.
When input data contains non-ascii characters, a suitable system locale
@@ -2657,33 +2702,33 @@ LIMITATIONS
In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger
add.
- Not all of Ledger's journal file syntax is supported. See file format
+ Not all of Ledger's journal file syntax is supported. See file format
differences.
- On large data files, hledger is slower and uses more memory than
+ On large data files, hledger is slower and uses more memory than
Ledger.
TROUBLESHOOTING
- Here are some issues you might encounter when you run hledger (and re-
- member you can also seek help from the IRC channel, mail list or bug
+ Here are some issues you might encounter when you run hledger (and re-
+ member you can also seek help from the IRC channel, mail list or bug
tracker):
Successfully installed, but "No command 'hledger' found"
stack and cabal install binaries into a special directory, which should
- be added to your PATH environment variable. Eg on unix-like systems,
+ be added to your PATH environment variable. Eg on unix-like systems,
that is ~/.local/bin and ~/.cabal/bin respectively.
I set a custom LEDGER_FILE, but hledger is still using the default file
- LEDGER_FILE should be a real environment variable, not just a shell
- variable. The command env | grep LEDGER_FILE should show it. You may
+ LEDGER_FILE should be a real environment variable, not just a shell
+ variable. The command env | grep LEDGER_FILE should show it. You may
need to use export. Here's an explanation.
- "Illegal byte sequence" or "Invalid or incomplete multibyte or wide
+ "Illegal byte sequence" or "Invalid or incomplete multibyte or wide
character" errors
In order to handle non-ascii letters and symbols (like ), hledger needs
an appropriate locale. This is usually configured system-wide; you can
also configure it temporarily. The locale may need to be one that sup-
- ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always,
+ ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always,
I'm not sure yet).
Here's an example of setting the locale temporarily, on ubuntu
@@ -2702,7 +2747,7 @@ TROUBLESHOOTING
$ echo "export LANG=en_US.UTF-8" >>~/.bash_profile
$ bash --login
- If we preferred to use eg fr_FR.utf8, we might have to install that
+ If we preferred to use eg fr_FR.utf8, we might have to install that
first:
$ apt-get install language-pack-fr
@@ -2723,7 +2768,7 @@ TROUBLESHOOTING
REPORTING BUGS
- Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
+ Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@@ -2737,7 +2782,7 @@ COPYRIGHT
SEE ALSO
- hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
+ hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@@ -2745,4 +2790,4 @@ SEE ALSO
-hledger 1.15 August 2019 hledger(1)
+hledger 1.15.2 September 2019 hledger(1)
diff --git a/embeddedfiles/hledger_csv.5 b/embeddedfiles/hledger_csv.5
index 50aa769..1e15ce1 100644
--- a/embeddedfiles/hledger_csv.5
+++ b/embeddedfiles/hledger_csv.5
@@ -1,5 +1,5 @@
-.TH "hledger_csv" "5" "August 2019" "hledger 1.15" "hledger User Manuals"
+.TH "hledger_csv" "5" "September 2019" "hledger 1.15.2" "hledger User Manuals"
diff --git a/embeddedfiles/hledger_csv.info b/embeddedfiles/hledger_csv.info
index e2f3cb2..1691013 100644
--- a/embeddedfiles/hledger_csv.info
+++ b/embeddedfiles/hledger_csv.info
@@ -3,8 +3,8 @@ This is hledger_csv.info, produced by makeinfo version 6.5 from stdin.

File: hledger_csv.info, Node: Top, Next: CSV RULES, Up: (dir)
-hledger_csv(5) hledger 1.15
-***************************
+hledger_csv(5) hledger 1.15.2
+*****************************
hledger can read CSV (comma-separated value) files as if they were
journal files, automatically converting each CSV record into a
@@ -350,35 +350,35 @@ character.

Tag Table:
Node: Top72
-Node: CSV RULES2161
-Ref: #csv-rules2269
-Node: skip2532
-Ref: #skip2626
-Node: date-format2798
-Ref: #date-format2925
-Node: field list3475
-Ref: #field-list3612
-Node: field assignment4342
-Ref: #field-assignment4497
-Node: conditional block5121
-Ref: #conditional-block5275
-Node: include6171
-Ref: #include6301
-Node: newest-first6532
-Ref: #newest-first6646
-Node: CSV TIPS7057
-Ref: #csv-tips7151
-Node: CSV ordering7295
-Ref: #csv-ordering7413
-Node: CSV accounts7594
-Ref: #csv-accounts7732
-Node: CSV amounts7986
-Ref: #csv-amounts8144
-Node: CSV balance assertions/assignments9224
-Ref: #csv-balance-assertionsassignments9442
-Node: Reading multiple CSV files9763
-Ref: #reading-multiple-csv-files9963
-Node: Valid CSV10237
-Ref: #valid-csv10360
+Node: CSV RULES2165
+Ref: #csv-rules2273
+Node: skip2536
+Ref: #skip2630
+Node: date-format2802
+Ref: #date-format2929
+Node: field list3479
+Ref: #field-list3616
+Node: field assignment4346
+Ref: #field-assignment4501
+Node: conditional block5125
+Ref: #conditional-block5279
+Node: include6175
+Ref: #include6305
+Node: newest-first6536
+Ref: #newest-first6650
+Node: CSV TIPS7061
+Ref: #csv-tips7155
+Node: CSV ordering7299
+Ref: #csv-ordering7417
+Node: CSV accounts7598
+Ref: #csv-accounts7736
+Node: CSV amounts7990
+Ref: #csv-amounts8148
+Node: CSV balance assertions/assignments9228
+Ref: #csv-balance-assertionsassignments9446
+Node: Reading multiple CSV files9767
+Ref: #reading-multiple-csv-files9967
+Node: Valid CSV10241
+Ref: #valid-csv10364

End Tag Table
diff --git a/embeddedfiles/hledger_csv.txt b/embeddedfiles/hledger_csv.txt
index b82e9d3..60f4cf8 100644
--- a/embeddedfiles/hledger_csv.txt
+++ b/embeddedfiles/hledger_csv.txt
@@ -276,4 +276,4 @@ SEE ALSO
-hledger 1.15 August 2019 hledger_csv(5)
+hledger 1.15.2 September 2019 hledger_csv(5)
diff --git a/embeddedfiles/hledger_journal.5 b/embeddedfiles/hledger_journal.5
index 7116d16..a4feb2b 100644
--- a/embeddedfiles/hledger_journal.5
+++ b/embeddedfiles/hledger_journal.5
@@ -1,6 +1,6 @@
.\"t
-.TH "hledger_journal" "5" "August 2019" "hledger 1.15" "hledger User Manuals"
+.TH "hledger_journal" "5" "September 2019" "hledger 1.15.2" "hledger User Manuals"
diff --git a/embeddedfiles/hledger_journal.info b/embeddedfiles/hledger_journal.info
index c4a785c..27388b5 100644
--- a/embeddedfiles/hledger_journal.info
+++ b/embeddedfiles/hledger_journal.info
@@ -4,8 +4,8 @@ stdin.

File: hledger_journal.info, Node: Top, Next: FILE FORMAT, Up: (dir)
-hledger_journal(5) hledger 1.15
-*******************************
+hledger_journal(5) hledger 1.15.2
+*********************************
hledger's usual data source is a plain text file containing journal
entries in hledger journal format. This file represents a standard
@@ -1668,113 +1668,113 @@ See the [[Cookbook]] at hledger.org for the latest information.

Tag Table:
Node: Top76
-Node: FILE FORMAT2352
-Ref: #file-format2476
-Node: Transactions2779
-Ref: #transactions2900
-Node: Postings3584
-Ref: #postings3711
-Node: Dates4706
-Ref: #dates4821
-Node: Simple dates4886
-Ref: #simple-dates5012
-Node: Secondary dates5378
-Ref: #secondary-dates5532
-Node: Posting dates7095
-Ref: #posting-dates7224
-Node: Status8596
-Ref: #status8716
-Node: Description10424
-Ref: #description10562
-Node: Payee and note10882
-Ref: #payee-and-note10996
-Node: Account names11331
-Ref: #account-names11474
-Node: Amounts11961
-Ref: #amounts12097
-Node: Virtual Postings15114
-Ref: #virtual-postings15273
-Node: Balance Assertions16493
-Ref: #balance-assertions16668
-Node: Assertions and ordering17627
-Ref: #assertions-and-ordering17813
-Node: Assertions and included files18513
-Ref: #assertions-and-included-files18754
-Node: Assertions and multiple -f options19087
-Ref: #assertions-and-multiple--f-options19341
-Node: Assertions and commodities19473
-Ref: #assertions-and-commodities19703
-Node: Assertions and prices20859
-Ref: #assertions-and-prices21071
-Node: Assertions and subaccounts21511
-Ref: #assertions-and-subaccounts21738
-Node: Assertions and virtual postings22062
-Ref: #assertions-and-virtual-postings22302
-Node: Assertions and precision22444
-Ref: #assertions-and-precision22635
-Node: Balance Assignments22902
-Ref: #balance-assignments23083
-Node: Balance assignments and prices24248
-Ref: #balance-assignments-and-prices24420
-Node: Transaction prices24644
-Ref: #transaction-prices24813
-Node: Comments27079
-Ref: #comments27213
-Node: Tags28383
-Ref: #tags28501
-Node: Directives29894
-Ref: #directives30037
-Node: Comment blocks35645
-Ref: #comment-blocks35790
-Node: Including other files35966
-Ref: #including-other-files36146
-Node: Default year36554
-Ref: #default-year36723
-Node: Declaring commodities37130
-Ref: #declaring-commodities37313
-Node: Default commodity38742
-Ref: #default-commodity38918
-Node: Market prices39552
-Ref: #market-prices39717
-Node: Declaring accounts40558
-Ref: #declaring-accounts40734
-Node: Account comments41659
-Ref: #account-comments41822
-Node: Account subdirectives42217
-Ref: #account-subdirectives42412
-Node: Account types42725
-Ref: #account-types42909
-Node: Account display order44551
-Ref: #account-display-order44721
-Node: Rewriting accounts45850
-Ref: #rewriting-accounts46035
-Node: Basic aliases46771
-Ref: #basic-aliases46917
-Node: Regex aliases47621
-Ref: #regex-aliases47793
-Node: Combining aliases48511
-Ref: #combining-aliases48689
-Node: end aliases49965
-Ref: #end-aliases50113
-Node: Default parent account50214
-Ref: #default-parent-account50380
-Node: Periodic transactions51264
-Ref: #periodic-transactions51462
-Node: Two spaces after the period expression52588
-Ref: #two-spaces-after-the-period-expression52833
-Node: Forecasting with periodic transactions53318
-Ref: #forecasting-with-periodic-transactions53608
-Node: Budgeting with periodic transactions55634
-Ref: #budgeting-with-periodic-transactions55873
-Node: Auto postings / transaction modifiers56332
-Ref: #auto-postings-transaction-modifiers56543
-Node: Auto postings and dates58772
-Ref: #auto-postings-and-dates59029
-Node: Auto postings and transaction balancing / inferred amounts / balance assertions59204
-Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions59579
-Node: Auto posting tags59957
-Ref: #auto-posting-tags60196
-Node: EDITOR SUPPORT60861
-Ref: #editor-support60979
+Node: FILE FORMAT2356
+Ref: #file-format2480
+Node: Transactions2783
+Ref: #transactions2904
+Node: Postings3588
+Ref: #postings3715
+Node: Dates4710
+Ref: #dates4825
+Node: Simple dates4890
+Ref: #simple-dates5016
+Node: Secondary dates5382
+Ref: #secondary-dates5536
+Node: Posting dates7099
+Ref: #posting-dates7228
+Node: Status8600
+Ref: #status8720
+Node: Description10428
+Ref: #description10566
+Node: Payee and note10886
+Ref: #payee-and-note11000
+Node: Account names11335
+Ref: #account-names11478
+Node: Amounts11965
+Ref: #amounts12101
+Node: Virtual Postings15118
+Ref: #virtual-postings15277
+Node: Balance Assertions16497
+Ref: #balance-assertions16672
+Node: Assertions and ordering17631
+Ref: #assertions-and-ordering17817
+Node: Assertions and included files18517
+Ref: #assertions-and-included-files18758
+Node: Assertions and multiple -f options19091
+Ref: #assertions-and-multiple--f-options19345
+Node: Assertions and commodities19477
+Ref: #assertions-and-commodities19707
+Node: Assertions and prices20863
+Ref: #assertions-and-prices21075
+Node: Assertions and subaccounts21515
+Ref: #assertions-and-subaccounts21742
+Node: Assertions and virtual postings22066
+Ref: #assertions-and-virtual-postings22306
+Node: Assertions and precision22448
+Ref: #assertions-and-precision22639
+Node: Balance Assignments22906
+Ref: #balance-assignments23087
+Node: Balance assignments and prices24252
+Ref: #balance-assignments-and-prices24424
+Node: Transaction prices24648
+Ref: #transaction-prices24817
+Node: Comments27083
+Ref: #comments27217
+Node: Tags28387
+Ref: #tags28505
+Node: Directives29898
+Ref: #directives30041
+Node: Comment blocks35649
+Ref: #comment-blocks35794
+Node: Including other files35970
+Ref: #including-other-files36150
+Node: Default year36558
+Ref: #default-year36727
+Node: Declaring commodities37134
+Ref: #declaring-commodities37317
+Node: Default commodity38746
+Ref: #default-commodity38922
+Node: Market prices39556
+Ref: #market-prices39721
+Node: Declaring accounts40562
+Ref: #declaring-accounts40738
+Node: Account comments41663
+Ref: #account-comments41826
+Node: Account subdirectives42221
+Ref: #account-subdirectives42416
+Node: Account types42729
+Ref: #account-types42913
+Node: Account display order44555
+Ref: #account-display-order44725
+Node: Rewriting accounts45854
+Ref: #rewriting-accounts46039
+Node: Basic aliases46775
+Ref: #basic-aliases46921
+Node: Regex aliases47625
+Ref: #regex-aliases47797
+Node: Combining aliases48515
+Ref: #combining-aliases48693
+Node: end aliases49969
+Ref: #end-aliases50117
+Node: Default parent account50218
+Ref: #default-parent-account50384
+Node: Periodic transactions51268
+Ref: #periodic-transactions51466
+Node: Two spaces after the period expression52592
+Ref: #two-spaces-after-the-period-expression52837
+Node: Forecasting with periodic transactions53322
+Ref: #forecasting-with-periodic-transactions53612
+Node: Budgeting with periodic transactions55638
+Ref: #budgeting-with-periodic-transactions55877
+Node: Auto postings / transaction modifiers56336
+Ref: #auto-postings-transaction-modifiers56547
+Node: Auto postings and dates58776
+Ref: #auto-postings-and-dates59033
+Node: Auto postings and transaction balancing / inferred amounts / balance assertions59208
+Ref: #auto-postings-and-transaction-balancing-inferred-amounts-balance-assertions59583
+Node: Auto posting tags59961
+Ref: #auto-posting-tags60200
+Node: EDITOR SUPPORT60865
+Ref: #editor-support60983

End Tag Table
diff --git a/embeddedfiles/hledger_journal.txt b/embeddedfiles/hledger_journal.txt
index 323cf9b..9bc2118 100644
--- a/embeddedfiles/hledger_journal.txt
+++ b/embeddedfiles/hledger_journal.txt
@@ -1362,4 +1362,4 @@ SEE ALSO
-hledger 1.15 August 2019 hledger_journal(5)
+hledger 1.15.2 September 2019 hledger_journal(5)
diff --git a/embeddedfiles/hledger_timeclock.5 b/embeddedfiles/hledger_timeclock.5
index 196a757..5dcc2e3 100644
--- a/embeddedfiles/hledger_timeclock.5
+++ b/embeddedfiles/hledger_timeclock.5
@@ -1,5 +1,5 @@
-.TH "hledger_timeclock" "5" "August 2019" "hledger 1.15" "hledger User Manuals"
+.TH "hledger_timeclock" "5" "September 2019" "hledger 1.15.2" "hledger User Manuals"
diff --git a/embeddedfiles/hledger_timeclock.info b/embeddedfiles/hledger_timeclock.info
index 3e2f4f5..512bc56 100644
--- a/embeddedfiles/hledger_timeclock.info
+++ b/embeddedfiles/hledger_timeclock.info
@@ -4,8 +4,8 @@ stdin.

File: hledger_timeclock.info, Node: Top, Up: (dir)
-hledger_timeclock(5) hledger 1.15
-*********************************
+hledger_timeclock(5) hledger 1.15.2
+***********************************
hledger can read timeclock files. As with Ledger, these are (a subset
of) timeclock.el's format, containing clock-in and clock-out entries as
diff --git a/embeddedfiles/hledger_timeclock.txt b/embeddedfiles/hledger_timeclock.txt
index 573517b..55d2391 100644
--- a/embeddedfiles/hledger_timeclock.txt
+++ b/embeddedfiles/hledger_timeclock.txt
@@ -78,4 +78,4 @@ SEE ALSO
-hledger 1.15 August 2019 hledger_timeclock(5)
+hledger 1.15.2 September 2019 hledger_timeclock(5)
diff --git a/embeddedfiles/hledger_timedot.5 b/embeddedfiles/hledger_timedot.5
index 9bf5bc3..d3d2255 100644
--- a/embeddedfiles/hledger_timedot.5
+++ b/embeddedfiles/hledger_timedot.5
@@ -1,5 +1,5 @@
-.TH "hledger_timedot" "5" "August 2019" "hledger 1.15" "hledger User Manuals"
+.TH "hledger_timedot" "5" "September 2019" "hledger 1.15.2" "hledger User Manuals"
diff --git a/embeddedfiles/hledger_timedot.info b/embeddedfiles/hledger_timedot.info
index a441da2..b9c6361 100644
--- a/embeddedfiles/hledger_timedot.info
+++ b/embeddedfiles/hledger_timedot.info
@@ -4,8 +4,8 @@ stdin.

File: hledger_timedot.info, Node: Top, Next: FILE FORMAT, Up: (dir)
-hledger_timedot(5) hledger 1.15
-*******************************
+hledger_timedot(5) hledger 1.15.2
+*********************************
Timedot is a plain text format for logging dated, categorised quantities
(of time, usually), supported by hledger. It is convenient for
@@ -111,7 +111,7 @@ $ hledger -f t.timedot --alias /\\./=: bal date:2016/2/4

Tag Table:
Node: Top76
-Node: FILE FORMAT808
-Ref: #file-format909
+Node: FILE FORMAT812
+Ref: #file-format913

End Tag Table
diff --git a/embeddedfiles/hledger_timedot.txt b/embeddedfiles/hledger_timedot.txt
index 2960def..6fd2a5b 100644
--- a/embeddedfiles/hledger_timedot.txt
+++ b/embeddedfiles/hledger_timedot.txt
@@ -124,4 +124,4 @@ SEE ALSO
-hledger 1.15 August 2019 hledger_timedot(5)
+hledger 1.15.2 September 2019 hledger_timedot(5)
diff --git a/hledger.1 b/hledger.1
index 1c38990..7c4a0ad 100644
--- a/hledger.1
+++ b/hledger.1
@@ -1,6 +1,6 @@
.\"t
-.TH "hledger" "1" "August 2019" "hledger 1.15" "hledger User Manuals"
+.TH "hledger" "1" "September 2019" "hledger 1.15.2" "hledger User Manuals"
@@ -1015,10 +1015,9 @@ This flag is equivalent to \f[C]--value=cost\f[R], described below.
The \f[C]-V/--market\f[R] flag converts reported amounts to their market
value in a default valuation commodity, using the market prices in
effect on a default valuation date.
-For single period reports, the valuation date is today; for multiperiod
-reports, it is the last day of each subperiod.
-It is equivalent to \f[C]--value=now\f[R] or \f[C]--value=end\f[R] (see
-below).
+For single period reports, the valuation date is today (equivalent to
+\f[C]--value=now\f[R]); for multiperiod reports, it is the last day of
+each subperiod (equivalent to \f[C]--value=end\f[R]).
.PP
The default valuation commodity is the one referenced in the latest
applicable market price dated on or before the valuation date.
@@ -1026,7 +1025,11 @@ If most of your P declarations lead to a single home currency, this will
usually be what you want.
(To specify the commodity, see -X below.)
.PP
-Here\[aq]s a quick example:
+Note that in hledger, market prices are always declared explicitly with
+P directives; we do not infer them from transaction prices as Ledger
+does.
+.PP
+Here\[aq]s a quick example of -V:
.IP
.nf
\f[C]
@@ -1070,20 +1073,13 @@ $ hledger -f t.j bal -N euros -V
$103.00 assets:euros
\f[R]
.fi
-.PP
-Note that in hledger, market prices are always declared explicitly with
-P directives; we do not infer them from transaction prices as Ledger
-does.
.SS -X: Market value in specified commodity
.PP
-The \f[C]-X/--exchange\f[R] option is like \f[C]-V/--market\f[R] except
-it takes a commodity symbol argument, so that you can select a different
-target commodity.
-It is similar to the same option in Ledger, with the same caveat
-mentioned above.
+The \f[C]-X/--exchange\f[R] option is like \f[C]-V\f[R], except it
+specifies the target commodity you would like to convert to.
It is equivalent to \f[C]--value=now,COMM\f[R] or
\f[C]--value=end,COMM\f[R].
-.SS --value
+.SS --value: Flexible valuation
.PP
\f[I](experimental, added 201905)\f[R]
.PP
@@ -1101,43 +1097,36 @@ more general \f[C]--value\f[R] option:
- default valuation commodity (or COMM) using market prices at some date
\f[R]
.fi
-.SS Valuation type
.PP
-TYPE is one of these keywords, or their first letter, or a date (which
-must be 8 digits with \f[C]-\f[R] or \f[C]/\f[R] or \f[C].\f[R]
-separators):
+The TYPE part basically selects either \[dq]cost\[dq], or \[dq]market
+value\[dq] plus a valuation date:
.TP
.B \f[C]--value=cost\f[R]
Convert amounts to cost, using the prices recorded in transactions.
-\f[C]-B\f[R]/\f[C]--cost\f[R] is equivalent to this.
.TP
.B \f[C]--value=end\f[R]
-Convert amounts to their value in default valuation commodity using
-market prices on the last day of the report period (or of each subperiod
-in a multiperiod report).
-When no report period is specified, uses the journal\[aq]s last
-transaction date.
+Convert amounts to their value in a default valuation commodity, using
+market prices on the last day of the report period (or if unspecified,
+the journal\[aq]s end date); or in multiperiod reports, market prices on
+the last day of each subperiod.
.TP
.B \f[C]--value=now\f[R]
Convert amounts to their value in default valuation commodity using
current market prices (as of when report is generated).
-\f[C]-V\f[R]/\f[C]--market\f[R] is equivalent to this.
.TP
.B \f[C]--value=YYYY-MM-DD\f[R]
Convert amounts to their value in default valuation commodity using
market prices on this date.
-Eg \f[C]--value=2019-04-25\f[R].
-.SS Valuation commodity
.PP
The default valuation commodity is the commodity mentioned in the most
recent applicable market price declaration.
When all your price declarations lead to a single home currency, this
will usually do what you want.
.PP
-To select a different valuation commodity: write the commodity symbol
-after the valuation type, separated by a comma (eg:
-\f[B]\f[CB]--value=now,EUR\f[B]\f[R]).
-This will use, in this preferred order:
+To select a different valuation commodity, add the optional
+\f[C],COMM\f[R] part: a comma, then the target commodity\[aq]s symbol.
+Eg: \f[B]\f[CB]--value=now,EUR\f[B]\f[R].
+hledger will do its best to convert amounts to this commodity, using:
.IP \[bu] 2
declared prices (from source commodity to valuation commodity)
.IP \[bu] 2
@@ -1145,10 +1134,12 @@ reverse prices (declared prices from valuation to source commodity,
inverted)
.IP \[bu] 2
indirect prices (prices calculated from the shortest chain of declared
-or reverse prices from source to valuation commodity).
-.SS --value examples
+or reverse prices from source to valuation commodity)
.PP
-Here are the effects of \f[C]--value\f[R] as seen with \f[C]print\f[R]:
+in that order.
+.PP
+Here are some examples showing the effect of \f[C]--value\f[R] as seen
+with \f[C]print\f[R]:
.IP
.nf
\f[C]
@@ -1297,25 +1288,28 @@ $ hledger print -X A
.fi
.SS Effect of --value on reports
.PP
-Below is how \f[C]--value\f[R] affects each of hledger\[aq]s reports,
-currently.
-You\[aq]re not expected to remember all this, but when troubleshooting a
-report, look here.
-If you find problems - useless reports, misbehaving reports, or error
-messages being printed - please report them (with reproducible examples)
-eg at #329.
+Here is a reference for how \f[C]--value\f[R] currently affects each
+part of hledger\[aq]s reports.
+It\[aq]s work in progress, but may be useful for troubleshooting or
+reporting bugs.
+See also the definitions and notes below.
+If you find problems, please report them, ideally with a reproducible
+example.
+Related: #329, #1083.
.PP
.TS
tab(@);
-lw(12.5n) lw(13.6n) lw(25.4n) lw(18.4n).
+lw(14.4n) lw(13.8n) lw(14.6n) lw(15.2n) lw(12.0n).
T{
Report type
T}@T{
-\f[C]--value\f[R] \f[C]cost\f[R]\
+\f[C]-B\f[R], \f[C]--value=cost\f[R]
+T}@T{
+\f[C]-V\f[R], \f[C]-X\f[R]
T}@T{
-\f[C]--value\f[R] \f[C]end\f[R]\
+\f[C]--value=end\f[R]
T}@T{
-\f[C]--value\f[R] \f[C]DATE\f[R]/\f[C]now\f[R]\
+\f[C]--value=DATE\f[R], \f[C]--value=now\f[R]
T}
_
T{
@@ -1323,119 +1317,224 @@ T{
T}@T{
T}@T{
T}@T{
+T}@T{
T}
T{
posting amounts
T}@T{
-cost, as recorded in transaction
+cost
+T}@T{
+value at report end or today
T}@T{
-market value at report end
+value at report or journal end
T}@T{
-market value at DATE
+value at DATE/today
T}
T{
-balance assertions/assignments
+balance assertions / assignments
+T}@T{
+unchanged
+T}@T{
+unchanged
+T}@T{
+unchanged
+T}@T{
+unchanged
+T}
+T{
+T}@T{
T}@T{
-show unvalued
T}@T{
-show unvalued
T}@T{
-show unvalued
T}
T{
\f[B]register\f[R]
T}@T{
T}@T{
T}@T{
+T}@T{
T}
T{
-starting balance with -H
+starting balance (with -H)
T}@T{
-cost of starting balance
+cost
T}@T{
-market value at day before report start
+value at day before report or journal start
T}@T{
-market value at DATE
+value at day before report or journal start
+T}@T{
+value at DATE/today
T}
T{
-posting amounts
+posting amounts (no report interval)
T}@T{
cost
T}@T{
-market value at report end
+value at report end or today
T}@T{
-market value at DATE
+value at report or journal end
+T}@T{
+value at DATE/today
T}
T{
-posting amounts, multiperiod
+summary posting amounts (with report interval)
T}@T{
summarised cost
T}@T{
-market value each summary posting at period end
+value at period ends
+T}@T{
+value at period ends
T}@T{
-market value each summary posting at DATE
+value at DATE/today
T}
T{
running total/average
T}@T{
-sum/average of the displayed values
+sum/average of displayed values
T}@T{
-sum/average of the displayed values
+sum/average of displayed values
T}@T{
-sum/average of the displayed values
+sum/average of displayed values
+T}@T{
+sum/average of displayed values
T}
T{
-\f[B]balance (bs, cf, is..)\f[R]
+T}@T{
T}@T{
T}@T{
T}@T{
T}
T{
-starting balances with -H
+\f[B]balance (bs, bse, cf, is..)\f[R]
+T}@T{
T}@T{
-costs of starting balances
T}@T{
-market value at day before report start of sum of previous postings
T}@T{
-market value at DATE of sum of previous postings
T}
T{
-balances, simple balance report
+balances (no report interval)
T}@T{
-summed costs
+sums of costs
T}@T{
-market value at period end of sum of postings
+value at report end or today of sums of postings
T}@T{
-market value at DATE of sum of postings
+value at report or journal end of sums of postings
+T}@T{
+value at DATE/today of sums of postings
T}
T{
-balances, multiperiod report
+balances (with report interval)
+T}@T{
+sums of costs
T}@T{
-summed costs
+value at period ends of sums of postings
T}@T{
-market value at period end of sum of postings
+value at period ends of sums of postings
T}@T{
-market value at DATE of sum of postings
+value at DATE/today of sums of postings
+T}
+T{
+starting balances (with report interval and -H)
+T}@T{
+sums of costs of postings before report start
+T}@T{
+sums of postings before report start
+T}@T{
+sums of postings before report start
+T}@T{
+sums of postings before report start
T}
T{
budget amounts with --budget
T}@T{
-costs of budget amounts
+like balances
+T}@T{
+like balances
+T}@T{
+like balances
+T}@T{
+like balances
+T}
+T{
+grand total (no report interval)
+T}@T{
+sum of displayed values
+T}@T{
+sum of displayed values
+T}@T{
+sum of displayed values
+T}@T{
+sum of displayed values
+T}
+T{
+row totals/averages (with report interval)
+T}@T{
+sums/averages of displayed values
+T}@T{
+sums/averages of displayed values
+T}@T{
+sums/averages of displayed values
+T}@T{
+sums/averages of displayed values
+T}
+T{
+column totals
+T}@T{
+sums of displayed values
+T}@T{
+sums of displayed values
+T}@T{
+sums of displayed values
+T}@T{
+sums of displayed values
+T}
+T{
+grand total/average
+T}@T{
+sum/average of column totals
+T}@T{
+sum/average of column totals
T}@T{
-budget-setting periodic txns are valued at period end
+sum/average of column totals
T}@T{
-budget-setting periodic txns are valued at DATE
+sum/average of column totals
T}
T{
-column/row/grand totals/averages
T}@T{
-sum/average of the displayed values
T}@T{
-market value at period end of sum/average of postings
T}@T{
-market value at DATE of sum/average of postings
+T}@T{
T}
.TE
+.PP
+\f[B]Additional notes\f[R]
+.TP
+.B \f[I]cost\f[R]
+calculated using price(s) recorded in the transaction(s).
+.TP
+.B \f[I]value\f[R]
+market value using available market price declarations, or the unchanged
+amount if no conversion rate can be found.
+.TP
+.B \f[I]report start\f[R]
+the first day of the report period specified with -b or -p or date:,
+otherwise today.
+.TP
+.B \f[I]report or journal start\f[R]
+the first day of the report period specified with -b or -p or date:,
+otherwise the earliest transaction date in the journal, otherwise today.
+.TP
+.B \f[I]report end\f[R]
+the last day of the report period specified with -e or -p or date:,
+otherwise today.
+.TP
+.B \f[I]report or journal end\f[R]
+the last day of the report period specified with -e or -p or date:,
+otherwise the latest transaction date in the journal, otherwise today.
+.TP
+.B \f[I]report interval\f[R]
+a flag (-D/-W/-M/-Q/-Y) or period expression that activates the
+report\[aq]s multi-period mode (whether showing one or many subperiods).
.SS Combining -B, -V, -X, --value
.PP
The rightmost of these flags wins.
diff --git a/hledger.cabal b/hledger.cabal
index 4132a04..50a4b0b 100644
--- a/hledger.cabal
+++ b/hledger.cabal
@@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
--- hash: 2f976d13d0036cdca6fca7319fa10dcec3ffdce46769bcde5421211d23d93e7c
+-- hash: f839c60877b230c5cb9cffe709ab8f7f6d770f16c15c68c25b3aed3cc0c65bb0
name: hledger
-version: 1.15.1
+version: 1.15.2
synopsis: Command-line interface for the hledger accounting tool
description: This is hledger's command-line interface.
Its basic function is to read a plain text file describing
@@ -146,7 +146,7 @@ library
other-modules:
Paths_hledger
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
- cpp-options: -DVERSION="1.15.1"
+ cpp-options: -DVERSION="1.15.2"
build-depends:
Decimal
, Diff
@@ -163,7 +163,7 @@ library
, filepath
, hashable >=1.2.4
, haskeline >=0.6
- , hledger-lib >=1.15.1 && <1.16
+ , hledger-lib >=1.15.2 && <1.16
, lucid
, math-functions >=0.2.0.0
, megaparsec >=7.0.0 && <8
@@ -199,7 +199,7 @@ executable hledger
hs-source-dirs:
app
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
- cpp-options: -DVERSION="1.15.1"
+ cpp-options: -DVERSION="1.15.2"
build-depends:
Decimal
, ansi-terminal >=0.6.2.3
@@ -215,7 +215,7 @@ executable hledger
, filepath
, haskeline >=0.6
, hledger
- , hledger-lib >=1.15.1 && <1.16
+ , hledger-lib >=1.15.2 && <1.16
, math-functions >=0.2.0.0
, megaparsec >=7.0.0 && <8
, mtl
@@ -253,7 +253,7 @@ test-suite test
hs-source-dirs:
test
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-type-defaults -fno-warn-orphans -optP-Wno-nonportable-include-path
- cpp-options: -DVERSION="1.15.1"
+ cpp-options: -DVERSION="1.15.2"
build-depends:
Decimal
, ansi-terminal >=0.6.2.3
@@ -269,7 +269,7 @@ test-suite test
, filepath
, haskeline >=0.6
, hledger
- , hledger-lib >=1.15.1 && <1.16
+ , hledger-lib >=1.15.2 && <1.16
, math-functions >=0.2.0.0
, megaparsec >=7.0.0 && <8
, mtl
@@ -323,7 +323,7 @@ benchmark bench
, filepath
, haskeline >=0.6
, hledger
- , hledger-lib >=1.15.1 && <1.16
+ , hledger-lib >=1.15.2 && <1.16
, html
, math-functions >=0.2.0.0
, megaparsec >=7.0.0 && <8
diff --git a/hledger.info b/hledger.info
index c7c3e74..bf6fbb0 100644
--- a/hledger.info
+++ b/hledger.info
@@ -3,8 +3,8 @@ This is hledger.info, produced by makeinfo version 6.5 from stdin.

File: hledger.info, Node: Top, Next: EXAMPLES, Up: (dir)
-hledger(1) hledger 1.15
-***********************
+hledger(1) hledger 1.15.2
+*************************
This is hledger's command-line interface (there are also curses and web
interfaces). Its basic function is to read a plain text file describing
@@ -753,7 +753,8 @@ File: hledger.info, Node: Valuation, Next: Output destination, Prev: Pivoting
* -B Cost::
* -V Market value::
* -X Market value in specified commodity::
-* --value::
+* --value Flexible valuation::
+* Effect of --value on reports::
* Combining -B -V -X --value::

@@ -775,15 +776,19 @@ File: hledger.info, Node: -V Market value, Next: -X Market value in specified
The '-V/--market' flag converts reported amounts to their market value
in a default valuation commodity, using the market prices in effect on a
default valuation date. For single period reports, the valuation date
-is today; for multiperiod reports, it is the last day of each subperiod.
-It is equivalent to '--value=now' or '--value=end' (see below).
+is today (equivalent to '--value=now'); for multiperiod reports, it is
+the last day of each subperiod (equivalent to '--value=end').
The default valuation commodity is the one referenced in the latest
applicable market price dated on or before the valuation date. If most
of your P declarations lead to a single home currency, this will usually
be what you want. (To specify the commodity, see -X below.)
- Here's a quick example:
+ Note that in hledger, market prices are always declared explicitly
+with P directives; we do not infer them from transaction prices as
+Ledger does.
+
+ Here's a quick example of -V:
; one euro is worth this many dollars from nov 1
P 2016/11/01 € $1.10
@@ -812,27 +817,21 @@ specified, defaults to today)
$ hledger -f t.j bal -N euros -V
$103.00 assets:euros
- Note that in hledger, market prices are always declared explicitly
-with P directives; we do not infer them from transaction prices as
-Ledger does.
-

-File: hledger.info, Node: -X Market value in specified commodity, Next: --value, Prev: -V Market value, Up: Valuation
+File: hledger.info, Node: -X Market value in specified commodity, Next: --value Flexible valuation, Prev: -V Market value, Up: Valuation
2.15.3 -X: Market value in specified commodity
----------------------------------------------
-The '-X/--exchange' option is like '-V/--market' except it takes a
-commodity symbol argument, so that you can select a different target
-commodity. It is similar to the same option in Ledger, with the same
-caveat mentioned above. It is equivalent to '--value=now,COMM' or
-'--value=end,COMM'.
+The '-X/--exchange' option is like '-V', except it specifies the target
+commodity you would like to convert to. It is equivalent to
+'--value=now,COMM' or '--value=end,COMM'.

-File: hledger.info, Node: --value, Next: Combining -B -V -X --value, Prev: -X Market value in specified commodity, Up: Valuation
+File: hledger.info, Node: --value Flexible valuation, Next: Effect of --value on reports, Prev: -X Market value in specified commodity, Up: Valuation
-2.15.4 -value
--------------
+2.15.4 -value: Flexible valuation
+---------------------------------
_(experimental, added 201905)_
@@ -847,70 +846,47 @@ option:
- default valuation commodity (or COMM) using current market prices
- default valuation commodity (or COMM) using market prices at some date
-* Menu:
-
-* Valuation type::
-* Valuation commodity::
-* --value examples::
-* Effect of --value on reports::
-
-
-File: hledger.info, Node: Valuation type, Next: Valuation commodity, Up: --value
-
-2.15.4.1 Valuation type
-.......................
-
-TYPE is one of these keywords, or their first letter, or a date (which
-must be 8 digits with '-' or '/' or '.' separators):
+ The TYPE part basically selects either "cost", or "market value" plus
+a valuation date:
'--value=cost'
Convert amounts to cost, using the prices recorded in transactions.
- '-B'/'--cost' is equivalent to this.
'--value=end'
- Convert amounts to their value in default valuation commodity using
- market prices on the last day of the report period (or of each
- subperiod in a multiperiod report). When no report period is
- specified, uses the journal's last transaction date.
+ Convert amounts to their value in a default valuation commodity,
+ using market prices on the last day of the report period (or if
+ unspecified, the journal's end date); or in multiperiod reports,
+ market prices on the last day of each subperiod.
'--value=now'
Convert amounts to their value in default valuation commodity using
current market prices (as of when report is generated).
- '-V'/'--market' is equivalent to this.
'--value=YYYY-MM-DD'
Convert amounts to their value in default valuation commodity using
- market prices on this date. Eg '--value=2019-04-25'.
-
-
-File: hledger.info, Node: Valuation commodity, Next: --value examples, Prev: Valuation type, Up: --value
+ market prices on this date.
-2.15.4.2 Valuation commodity
-............................
-
-The default valuation commodity is the commodity mentioned in the most
-recent applicable market price declaration. When all your price
+ The default valuation commodity is the commodity mentioned in the
+most recent applicable market price declaration. When all your price
declarations lead to a single home currency, this will usually do what
you want.
- To select a different valuation commodity: write the commodity symbol
-after the valuation type, separated by a comma (eg:
-*'--value=now,EUR'*). This will use, in this preferred order:
+ To select a different valuation commodity, add the optional ',COMM'
+part: a comma, then the target commodity's symbol. Eg:
+*'--value=now,EUR'*. hledger will do its best to convert amounts to
+this commodity, using:
* declared prices (from source commodity to valuation commodity)
* reverse prices (declared prices from valuation to source commodity,
inverted)
* indirect prices (prices calculated from the shortest chain of
- declared or reverse prices from source to valuation commodity).
+ declared or reverse prices from source to valuation commodity)
-
-File: hledger.info, Node: --value examples, Next: Effect of --value on reports, Prev: Valuation commodity, Up: --value
+ in that order.
-2.15.4.3 -value examples
-........................
-
-Here are the effects of '--value' as seen with 'print':
+ Here are some examples showing the effect of '--value' as seen with
+'print':
P 2000-01-01 A 1 B
P 2000-02-01 A 2 B
@@ -1018,65 +994,116 @@ $ hledger print -X A
b -0.50A

-File: hledger.info, Node: Effect of --value on reports, Prev: --value examples, Up: --value
+File: hledger.info, Node: Effect of --value on reports, Next: Combining -B -V -X --value, Prev: --value Flexible valuation, Up: Valuation
-2.15.4.4 Effect of -value on reports
-....................................
+2.15.5 Effect of -value on reports
+----------------------------------
-Below is how '--value' affects each of hledger's reports, currently.
-You're not expected to remember all this, but when troubleshooting a
-report, look here. If you find problems - useless reports, misbehaving
-reports, or error messages being printed - please report them (with
-reproducible examples) eg at #329.
+Here is a reference for how '--value' currently affects each part of
+hledger's reports. It's work in progress, but may be useful for
+troubleshooting or reporting bugs. See also the definitions and notes
+below. If you find problems, please report them, ideally with a
+reproducible example. Related: #329, #1083.
-Report type '--value' '--value' 'end' '--value'
- 'cost' 'DATE'/'now'
-----------------------------------------------------------------------------
+Report type '-B', '-V', '-X' '--value=end' '--value=DATE',
+ '--value=cost' '--value=now'
+-----------------------------------------------------------------------------
*print*
-posting cost, as market value at report market value at
-amounts recorded in end DATE
- transaction
-balance show show unvalued show unvalued
-assertions/assignmentsunvalued
+posting cost value at value at value at
+amounts report end or report or DATE/today
+ today journal end
+balance unchanged unchanged unchanged unchanged
+assertions /
+assignments
*register*
-starting cost of market value at day market value at
-balance starting before report start DATE
-with -H balance
-posting cost market value at report market value at
-amounts end DATE
-posting summarised market value each market value each
-amounts, cost summary posting at summary posting
-multiperiod period end at DATE
-running sum/average sum/average of the sum/average of
-total/average of the displayed values the displayed
- displayed values
- values
-*balance
-(bs, cf,
-is..)*
-starting costs of market value at day market value at
-balances starting before report start of DATE of sum of
-with -H balances sum of previous postings previous postings
-balances, summed costs market value at period market value at
-simple end of sum of postings DATE of sum of
-balance postings
+starting cost value at day value at day value at
+balance (with before report before report DATE/today
+-H) or journal or journal
+ start start
+posting cost value at value at value at
+amounts (no report end or report or DATE/today
+report today journal end
+interval)
+summary summarised value at value at value at
+posting cost period ends period ends DATE/today
+amounts (with
report
-balances, summed costs market value at period market value at
-multiperiod end of sum of postings DATE of sum of
-report postings
-budget costs of budget-setting periodic budget-setting
-amounts budget txns are valued at periodic txns are
-with amounts period end valued at DATE
+interval)
+running sum/average sum/average sum/average of sum/average
+total/average of displayed of displayed displayed of
+ values values values displayed
+ values
+*balance (bs,
+bse, cf,
+is..)*
+balances (no sums of value at value at value at
+report costs report end or report or DATE/today
+interval) today of sums journal end of of sums of
+ of postings sums of postings
+ postings
+balances sums of value at value at value at
+(with report costs period ends period ends of DATE/today
+interval) of sums of sums of of sums of
+ postings postings postings
+starting sums of sums of sums of sums of
+balances costs of postings postings postings
+(with report postings before report before report before
+interval and before start start report
+-H) report start start
+budget like like balances like balances like
+amounts with balances balances
-budget
-column/row/grandsum/average market value at period market value at
-totals/averagesof the end of sum/average of DATE of
- displayed postings sum/average of
- values postings
+grand total sum of sum of sum of sum of
+(no report displayed displayed displayed displayed
+interval) values values values values
+row sums/averages sums/averages sums/averages sums/averages
+totals/averages of displayed of displayed of displayed of
+(with report values values values displayed
+interval) values
+column totals sums of sums of sums of sums of
+ displayed displayed displayed displayed
+ values values values values
+grand sum/average sum/average sum/average of sum/average
+total/average of column of column column totals of column
+ totals totals totals
+
+ *Additional notes*
+
+_cost_
+
+ calculated using price(s) recorded in the transaction(s).
+_value_
+
+ market value using available market price declarations, or the
+ unchanged amount if no conversion rate can be found.
+_report start_
+
+ the first day of the report period specified with -b or -p or
+ date:, otherwise today.
+_report or journal start_
+
+ the first day of the report period specified with -b or -p or
+ date:, otherwise the earliest transaction date in the journal,
+ otherwise today.
+_report end_
+
+ the last day of the report period specified with -e or -p or date:,
+ otherwise today.
+_report or journal end_
+
+ the last day of the report period specified with -e or -p or date:,
+ otherwise the latest transaction date in the journal, otherwise
+ today.
+_report interval_
+
+ a flag (-D/-W/-M/-Q/-Y) or period expression that activates the
+ report's multi-period mode (whether showing one or many
+ subperiods).

-File: hledger.info, Node: Combining -B -V -X --value, Prev: --value, Up: Valuation
+File: hledger.info, Node: Combining -B -V -X --value, Prev: Effect of --value on reports, Up: Valuation
-2.15.5 Combining -B, -V, -X, -value
+2.15.6 Combining -B, -V, -X, -value
-----------------------------------
The rightmost of these flags wins.
@@ -3133,185 +3160,179 @@ hledger-check.hs checks more powerful account balance assertions.

Tag Table:
Node: Top68
-Node: EXAMPLES1885
-Ref: #examples1985
-Node: OPTIONS3631
-Ref: #options3733
-Node: General options4132
-Ref: #general-options4257
-Node: Command options6911
-Ref: #command-options7062
-Node: Command arguments7460
-Ref: #command-arguments7614
-Node: Argument files7735
-Ref: #argument-files7911
-Node: Special characters in arguments and queries8177
-Ref: #special-characters-in-arguments-and-queries8411
-Node: More escaping8862
-Ref: #more-escaping9024
-Node: Even more escaping9320
-Ref: #even-more-escaping9514
-Node: Less escaping10185
-Ref: #less-escaping10347
-Node: Command line tips10592
-Ref: #command-line-tips10778
-Node: Unicode characters11155
-Ref: #unicode-characters11311
-Node: Input files12723
-Ref: #input-files12859
-Node: Smart dates14788
-Ref: #smart-dates14929
-Node: Report start & end date16335
-Ref: #report-start-end-date16507
-Node: Report intervals17931
-Ref: #report-intervals18096
-Node: Period expressions18486
-Ref: #period-expressions18646
-Node: Depth limiting22603
-Ref: #depth-limiting22747
-Node: Pivoting23089
-Ref: #pivoting23212
-Node: Valuation24888
-Ref: #valuation25017
-Node: -B Cost25145
-Ref: #b-cost25256
-Node: -V Market value25454
-Ref: #v-market-value25628
-Node: -X Market value in specified commodity27058
-Ref: #x-market-value-in-specified-commodity27278
-Node: --value27572
-Ref: #value27737
-Node: Valuation type28538
-Ref: #valuation-type28674
-Node: Valuation commodity29559
-Ref: #valuation-commodity29730
-Node: --value examples30430
-Ref: #value-examples30607
-Node: Effect of --value on reports32590
-Ref: #effect-of---value-on-reports32763
-Node: Combining -B -V -X --value35454
-Ref: #combining--b--v--x---value35616
-Node: Output destination35652
-Ref: #output-destination35804
-Node: Output format36087
-Ref: #output-format36239
-Node: Regular expressions36624
-Ref: #regular-expressions36761
-Node: QUERIES38122
-Ref: #queries38224
-Node: COMMANDS42186
-Ref: #commands42298
-Node: accounts43362
-Ref: #accounts43460
-Node: activity44159
-Ref: #activity44269
-Node: add44652
-Ref: #add44751
-Node: balance47496
-Ref: #balance47607
-Node: Classic balance report49049
-Ref: #classic-balance-report49222
-Node: Customising the classic balance report50591
-Ref: #customising-the-classic-balance-report50819
-Node: Colour support52895
-Ref: #colour-support53062
-Node: Flat mode53235
-Ref: #flat-mode53383
-Node: Depth limited balance reports53796
-Ref: #depth-limited-balance-reports53996
-Node: Multicolumn balance report54452
-Ref: #multicolumn-balance-report54650
-Node: Budget report59964
-Ref: #budget-report60107
-Node: Nested budgets65309
-Ref: #nested-budgets65421
-Ref: #output-format-168901
-Node: balancesheet68979
-Ref: #balancesheet69115
-Node: balancesheetequity70430
-Ref: #balancesheetequity70579
-Node: cashflow71140
-Ref: #cashflow71268
-Node: check-dates72296
-Ref: #check-dates72423
-Node: check-dupes72702
-Ref: #check-dupes72826
-Node: close73119
-Ref: #close73233
-Node: commodities76820
-Ref: #commodities76947
-Node: descriptions77029
-Ref: #descriptions77157
-Node: diff77338
-Ref: #diff77444
-Node: files78491
-Ref: #files78591
-Node: help78738
-Ref: #help78838
-Node: import79931
-Ref: #import80045
-Node: Importing balance assignments80833
-Ref: #importing-balance-assignments80981
-Node: incomestatement81630
-Ref: #incomestatement81763
-Node: notes83099
-Ref: #notes83212
-Node: payees83338
-Ref: #payees83444
-Node: prices83602
-Ref: #prices83708
-Node: print83987
-Ref: #print84097
-Node: print-unique88590
-Ref: #print-unique88716
-Node: register89001
-Ref: #register89128
-Node: Custom register output93300
-Ref: #custom-register-output93429
-Node: register-match94691
-Ref: #register-match94825
-Node: rewrite95176
-Ref: #rewrite95291
-Node: Re-write rules in a file97146
-Ref: #re-write-rules-in-a-file97280
-Node: Diff output format98490
-Ref: #diff-output-format98659
-Node: rewrite vs print --auto99751
-Ref: #rewrite-vs.-print---auto99930
-Node: roi100486
-Ref: #roi100584
-Node: stats101596
-Ref: #stats101695
-Node: tags102483
-Ref: #tags102581
-Node: test102875
-Ref: #test102959
-Node: ADD-ON COMMANDS103720
-Ref: #add-on-commands103830
-Node: Official add-ons105118
-Ref: #official-add-ons105258
-Node: api105346
-Ref: #api105435
-Node: ui105487
-Ref: #ui105586
-Node: web105644
-Ref: #web105733
-Node: Third party add-ons105779
-Ref: #third-party-add-ons105954
-Ref: #diff-1106113
-Node: iadd106212
-Ref: #iadd106322
-Node: interest106405
-Ref: #interest106526
-Node: irr106621
-Ref: #irr106719
-Node: Experimental add-ons106850
-Ref: #experimental-add-ons107002
-Node: autosync107283
-Ref: #autosync107394
-Node: chart107633
-Ref: #chart107752
-Node: check107823
-Ref: #check107925
+Node: EXAMPLES1889
+Ref: #examples1989
+Node: OPTIONS3635
+Ref: #options3737
+Node: General options4136
+Ref: #general-options4261
+Node: Command options6915
+Ref: #command-options7066
+Node: Command arguments7464
+Ref: #command-arguments7618
+Node: Argument files7739
+Ref: #argument-files7915
+Node: Special characters in arguments and queries8181
+Ref: #special-characters-in-arguments-and-queries8415
+Node: More escaping8866
+Ref: #more-escaping9028
+Node: Even more escaping9324
+Ref: #even-more-escaping9518
+Node: Less escaping10189
+Ref: #less-escaping10351
+Node: Command line tips10596
+Ref: #command-line-tips10782
+Node: Unicode characters11159
+Ref: #unicode-characters11315
+Node: Input files12727
+Ref: #input-files12863
+Node: Smart dates14792
+Ref: #smart-dates14933
+Node: Report start & end date16339
+Ref: #report-start-end-date16511
+Node: Report intervals17935
+Ref: #report-intervals18100
+Node: Period expressions18490
+Ref: #period-expressions18650
+Node: Depth limiting22607
+Ref: #depth-limiting22751
+Node: Pivoting23093
+Ref: #pivoting23216
+Node: Valuation24892
+Ref: #valuation25021
+Node: -B Cost25201
+Ref: #b-cost25312
+Node: -V Market value25510
+Ref: #v-market-value25684
+Node: -X Market value in specified commodity27116
+Ref: #x-market-value-in-specified-commodity27355
+Node: --value Flexible valuation27531
+Ref: #value-flexible-valuation27757
+Node: Effect of --value on reports31947
+Ref: #effect-of---value-on-reports32163
+Node: Combining -B -V -X --value37094
+Ref: #combining--b--v--x---value37277
+Node: Output destination37313
+Ref: #output-destination37465
+Node: Output format37748
+Ref: #output-format37900
+Node: Regular expressions38285
+Ref: #regular-expressions38422
+Node: QUERIES39783
+Ref: #queries39885
+Node: COMMANDS43847
+Ref: #commands43959
+Node: accounts45023
+Ref: #accounts45121
+Node: activity45820
+Ref: #activity45930
+Node: add46313
+Ref: #add46412
+Node: balance49157
+Ref: #balance49268
+Node: Classic balance report50710
+Ref: #classic-balance-report50883
+Node: Customising the classic balance report52252
+Ref: #customising-the-classic-balance-report52480
+Node: Colour support54556
+Ref: #colour-support54723
+Node: Flat mode54896
+Ref: #flat-mode55044
+Node: Depth limited balance reports55457
+Ref: #depth-limited-balance-reports55657
+Node: Multicolumn balance report56113
+Ref: #multicolumn-balance-report56311
+Node: Budget report61625
+Ref: #budget-report61768
+Node: Nested budgets66970
+Ref: #nested-budgets67082
+Ref: #output-format-170562
+Node: balancesheet70640
+Ref: #balancesheet70776
+Node: balancesheetequity72091
+Ref: #balancesheetequity72240
+Node: cashflow72801
+Ref: #cashflow72929
+Node: check-dates73957
+Ref: #check-dates74084
+Node: check-dupes74363
+Ref: #check-dupes74487
+Node: close74780
+Ref: #close74894
+Node: commodities78481
+Ref: #commodities78608
+Node: descriptions78690
+Ref: #descriptions78818
+Node: diff78999
+Ref: #diff79105
+Node: files80152
+Ref: #files80252
+Node: help80399
+Ref: #help80499
+Node: import81592
+Ref: #import81706
+Node: Importing balance assignments82494
+Ref: #importing-balance-assignments82642
+Node: incomestatement83291
+Ref: #incomestatement83424
+Node: notes84760
+Ref: #notes84873
+Node: payees84999
+Ref: #payees85105
+Node: prices85263
+Ref: #prices85369
+Node: print85648
+Ref: #print85758
+Node: print-unique90251
+Ref: #print-unique90377
+Node: register90662
+Ref: #register90789
+Node: Custom register output94961
+Ref: #custom-register-output95090
+Node: register-match96352
+Ref: #register-match96486
+Node: rewrite96837
+Ref: #rewrite96952
+Node: Re-write rules in a file98807
+Ref: #re-write-rules-in-a-file98941
+Node: Diff output format100151
+Ref: #diff-output-format100320
+Node: rewrite vs print --auto101412
+Ref: #rewrite-vs.-print---auto101591
+Node: roi102147
+Ref: #roi102245
+Node: stats103257
+Ref: #stats103356
+Node: tags104144
+Ref: #tags104242
+Node: test104536
+Ref: #test104620
+Node: ADD-ON COMMANDS105381
+Ref: #add-on-commands105491
+Node: Official add-ons106779
+Ref: #official-add-ons106919
+Node: api107007
+Ref: #api107096
+Node: ui107148
+Ref: #ui107247
+Node: web107305
+Ref: #web107394
+Node: Third party add-ons107440
+Ref: #third-party-add-ons107615
+Ref: #diff-1107774
+Node: iadd107873
+Ref: #iadd107983
+Node: interest108066
+Ref: #interest108187
+Node: irr108282
+Ref: #irr108380
+Node: Experimental add-ons108511
+Ref: #experimental-add-ons108663
+Node: autosync108944
+Ref: #autosync109055
+Node: chart109294
+Ref: #chart109413
+Node: check109484
+Ref: #check109586

End Tag Table
diff --git a/hledger.txt b/hledger.txt
index ee9409a..bf412c3 100644
--- a/hledger.txt
+++ b/hledger.txt
@@ -688,15 +688,19 @@ OPTIONS
The -V/--market flag converts reported amounts to their market value in
a default valuation commodity, using the market prices in effect on a
default valuation date. For single period reports, the valuation date
- is today; for multiperiod reports, it is the last day of each subpe-
- riod. It is equivalent to --value=now or --value=end (see below).
+ is today (equivalent to --value=now); for multiperiod reports, it is
+ the last day of each subperiod (equivalent to --value=end).
The default valuation commodity is the one referenced in the latest ap-
plicable market price dated on or before the valuation date. If most
of your P declarations lead to a single home currency, this will usu-
ally be what you want. (To specify the commodity, see -X below.)
- Here's a quick example:
+ Note that in hledger, market prices are always declared explicitly with
+ P directives; we do not infer them from transaction prices as Ledger
+ does.
+
+ Here's a quick example of -V:
; one euro is worth this many dollars from nov 1
P 2016/11/01 EUR $1.10
@@ -725,18 +729,12 @@ OPTIONS
$ hledger -f t.j bal -N euros -V
$103.00 assets:euros
- Note that in hledger, market prices are always declared explicitly with
- P directives; we do not infer them from transaction prices as Ledger
- does.
-
-X: Market value in specified commodity
- The -X/--exchange option is like -V/--market except it takes a commod-
- ity symbol argument, so that you can select a different target commod-
- ity. It is similar to the same option in Ledger, with the same caveat
- mentioned above. It is equivalent to --value=now,COMM or
- --value=end,COMM.
+ The -X/--exchange option is like -V, except it specifies the target
+ commodity you would like to convert to. It is equivalent to
+ --value=now,COMM or --value=end,COMM.
- --value
+ --value: Flexible valuation
(experimental, added 201905)
-B, -V and -X are special cases of the more general --value option:
@@ -749,49 +747,48 @@ OPTIONS
- default valuation commodity (or COMM) using current market prices
- default valuation commodity (or COMM) using market prices at some date
- Valuation type
- TYPE is one of these keywords, or their first letter, or a date (which
- must be 8 digits with - or / or . separators):
+ The TYPE part basically selects either "cost", or "market value" plus a
+ valuation date:
--value=cost
Convert amounts to cost, using the prices recorded in transac-
- tions. -B/--cost is equivalent to this.
+ tions.
--value=end
- Convert amounts to their value in default valuation commodity
- using market prices on the last day of the report period (or of
- each subperiod in a multiperiod report). When no report period
- is specified, uses the journal's last transaction date.
+ Convert amounts to their value in a default valuation commodity,
+ using market prices on the last day of the report period (or if
+ unspecified, the journal's end date); or in multiperiod reports,
+ market prices on the last day of each subperiod.
--value=now
Convert amounts to their value in default valuation commodity
- using current market prices (as of when report is generated).
- -V/--market is equivalent to this.
+ using current market prices (as of when report is generated).
--value=YYYY-MM-DD
- Convert amounts to their value in default valuation commodity
- using market prices on this date. Eg --value=2019-04-25.
+ Convert amounts to their value in default valuation commodity
+ using market prices on this date.
- Valuation commodity
- The default valuation commodity is the commodity mentioned in the most
+ The default valuation commodity is the commodity mentioned in the most
recent applicable market price declaration. When all your price decla-
- rations lead to a single home currency, this will usually do what you
+ rations lead to a single home currency, this will usually do what you
want.
- To select a different valuation commodity: write the commodity symbol
- after the valuation type, separated by a comma (eg: --value=now,EUR).
- This will use, in this preferred order:
+ To select a different valuation commodity, add the optional ,COMM part:
+ a comma, then the target commodity's symbol. Eg: --value=now,EUR.
+ hledger will do its best to convert amounts to this commodity, using:
o declared prices (from source commodity to valuation commodity)
- o reverse prices (declared prices from valuation to source commodity,
+ o reverse prices (declared prices from valuation to source commodity,
inverted)
- o indirect prices (prices calculated from the shortest chain of de-
- clared or reverse prices from source to valuation commodity).
+ o indirect prices (prices calculated from the shortest chain of de-
+ clared or reverse prices from source to valuation commodity)
- --value examples
- Here are the effects of --value as seen with print:
+ in that order.
+
+ Here are some examples showing the effect of --value as seen with
+ print:
P 2000-01-01 A 1 B
P 2000-02-01 A 2 B
@@ -898,66 +895,114 @@ OPTIONS
b -0.50A
Effect of --value on reports
- Below is how --value affects each of hledger's reports, currently.
- You're not expected to remember all this, but when troubleshooting a
- report, look here. If you find problems - useless reports, misbehaving
- reports, or error messages being printed - please report them (with re-
- producible examples) eg at #329.
-
- Report type --value cost --value end --value DATE/now
- ---------------------------------------------------------------------------------
+ Here is a reference for how --value currently affects each part of
+ hledger's reports. It's work in progress, but may be useful for trou-
+ bleshooting or reporting bugs. See also the definitions and notes be-
+ low. If you find problems, please report them, ideally with a repro-
+ ducible example. Related: #329, #1083.
+
+ Report type -B, -V, -X --value=end --value=DATE,
+ --value=cost --value=now
+ -------------------------------------------------------------------------------------
print
- posting cost, as market value at report market value at
- amounts recorded in end DATE
- transaction
- balance as- show unvalued show unvalued show unvalued
- sertions/as-
+ posting cost value at report value at report value at
+ amounts end or today or journal end DATE/today
+ balance asser- unchanged unchanged unchanged unchanged
+ tions / as-
signments
+
register
- starting cost of start- market value at day be- market value at
- balance with ing balance fore report start DATE
- -H
- posting cost market value at report market value at
- amounts end DATE
- posting summarised market value each summary market value each
- amounts, cost posting at period end summary posting at
- multiperiod DATE
- running to- sum/average of sum/average of the dis- sum/average of the
- tal/average the displayed played values displayed values
- values
- balance (bs,
- cf, is..)
- starting costs of market value at day be- market value at
- balances starting bal- fore report start of sum DATE of sum of
- with -H ances of previous postings previous postings
- balances, summed costs market value at period market value at
- simple bal- end of sum of postings DATE of sum of
- ance report postings
- balances, summed costs market value at period market value at
- multiperiod end of sum of postings DATE of sum of
- report postings
- budget costs of bud- budget-setting periodic budget-setting pe-
- amounts with get amounts txns are valued at period riodic txns are
- --budget end valued at DATE
- col- sum/average of market value at period market value at
- umn/row/grand the displayed end of sum/average of DATE of sum/aver-
- totals/aver- values postings age of postings
- ages
+ starting bal- cost value at day value at day value at
+ ance (with -H) before report before report DATE/today
+ or journal or journal
+ start start
+ posting cost value at report value at report value at
+ amounts (no end or today or journal end DATE/today
+ report inter-
+ val)
+ summary post- summarised value at period value at period value at
+ ing amounts cost ends ends DATE/today
+ (with report
+ interval)
+ running to- sum/average of sum/average of sum/average of sum/average
+ tal/average displayed val- displayed val- displayed val- of displayed
+ ues ues ues values
+
+ balance (bs,
+ bse, cf, is..)
+ balances (no sums of costs value at report value at report value at
+ report inter- end or today of or journal end DATE/today of
+ val) sums of post- of sums of sums of post-
+ ings postings ings
+ balances (with sums of costs value at period value at period value at
+ report inter- ends of sums of ends of sums of DATE/today of
+ val) postings postings sums of post-
+ ings
+ starting bal- sums of costs sums of post- sums of post- sums of post-
+ ances (with of postings ings before re- ings before re- ings before
+ report inter- before report port start port start report start
+ val and -H) start
+ budget amounts like balances like balances like balances like balances
+ with --budget
+ grand total sum of dis- sum of dis- sum of dis- sum of dis-
+ (no report in- played values played values played values played values
+ terval)
+
+ row totals/av- sums/averages sums/averages sums/averages sums/averages
+ erages (with of displayed of displayed of displayed of displayed
+ report inter- values values values values
+ val)
+ column totals sums of dis- sums of dis- sums of dis- sums of dis-
+ played values played values played values played values
+ grand to- sum/average of sum/average of sum/average of sum/average
+ tal/average column totals column totals column totals of column to-
+ tals
+
+
+ Additional notes
+
+ cost calculated using price(s) recorded in the transaction(s).
+
+ value market value using available market price declarations, or the
+ unchanged amount if no conversion rate can be found.
+
+ report start
+ the first day of the report period specified with -b or -p or
+ date:, otherwise today.
+
+ report or journal start
+ the first day of the report period specified with -b or -p or
+ date:, otherwise the earliest transaction date in the journal,
+ otherwise today.
+
+ report end
+ the last day of the report period specified with -e or -p or
+ date:, otherwise today.
+
+ report or journal end
+ the last day of the report period specified with -e or -p or
+ date:, otherwise the latest transaction date in the journal,
+ otherwise today.
+
+ report interval
+ a flag (-D/-W/-M/-Q/-Y) or period expression that activates the
+ report's multi-period mode (whether showing one or many subperi-
+ ods).
Combining -B, -V, -X, --value
The rightmost of these flags wins.
Output destination
- Some commands (print, register, stats, the balance commands) can write
- their output to a destination other than the console. This is con-
+ Some commands (print, register, stats, the balance commands) can write
+ their output to a destination other than the console. This is con-
trolled by the -o/--output-file option.
$ hledger balance -o - # write to stdout (the default)
$ hledger balance -o FILE # write to FILE
Output format
- Some commands can write their output in other formats. Eg print and
- register can output CSV, and the balance commands can output CSV or
+ Some commands can write their output in other formats. Eg print and
+ register can output CSV, and the balance commands can output CSV or
HTML. This is controlled by the -O/--output-format option, or by spec-
ifying a .csv or .html file extension with -o/--output-file.
@@ -967,56 +1012,56 @@ OPTIONS
Regular expressions
hledger uses regular expressions in a number of places:
- o query terms, on the command line and in the hledger-web search form:
+ o query terms, on the command line and in the hledger-web search form:
REGEX, desc:REGEX, cur:REGEX, tag:...=REGEX
o CSV rules conditional blocks: if REGEX ...
- o account alias directives and options: alias /REGEX/ = REPLACEMENT,
+ o account alias directives and options: alias /REGEX/ = REPLACEMENT,
--alias /REGEX/=REPLACEMENT
- hledger's regular expressions come from the regex-tdfa library. In
+ hledger's regular expressions come from the regex-tdfa library. In
general they:
o are case insensitive
- o are infix matching (do not need to match the entire thing being
+ o are infix matching (do not need to match the entire thing being
matched)
o are POSIX extended regular expressions
o also support GNU word boundaries (\<, \>, \b, \B)
- o and parenthesised capturing groups and numeric backreferences in re-
+ o and parenthesised capturing groups and numeric backreferences in re-
placement strings
o do not support mode modifiers like (?s)
Some things to note:
- o In the alias directive and --alias option, regular expressions must
- be enclosed in forward slashes (/REGEX/). Elsewhere in hledger,
+ o In the alias directive and --alias option, regular expressions must
+ be enclosed in forward slashes (/REGEX/). Elsewhere in hledger,
these are not required.
- o In queries, to match a regular expression metacharacter like $ as a
- literal character, prepend a backslash. Eg to search for amounts
+ o In queries, to match a regular expression metacharacter like $ as a
+ literal character, prepend a backslash. Eg to search for amounts
with the dollar sign in hledger-web, write cur:\$.
- o On the command line, some metacharacters like $ have a special mean-
+ o On the command line, some metacharacters like $ have a special mean-
ing to the shell and so must be escaped at least once more. See Spe-
cial characters.
QUERIES
- One of hledger's strengths is being able to quickly report on precise
- subsets of your data. Most commands accept an optional query expres-
- sion, written as arguments after the command name, to filter the data
- by date, account name or other criteria. The syntax is similar to a
+ One of hledger's strengths is being able to quickly report on precise
+ subsets of your data. Most commands accept an optional query expres-
+ sion, written as arguments after the command name, to filter the data
+ by date, account name or other criteria. The syntax is similar to a
web search: one or more space-separated search terms, quotes to enclose
- whitespace, prefixes to match specific fields, a not: prefix to negate
+ whitespace, prefixes to match specific fields, a not: prefix to negate
the match.
- We do not yet support arbitrary boolean combinations of search terms;
- instead most commands show transactions/postings/accounts which match
+ We do not yet support arbitrary boolean combinations of search terms;
+ instead most commands show transactions/postings/accounts which match
(or negatively match):
o any of the description terms AND
@@ -1037,31 +1082,31 @@ QUERIES
o match all the other terms.
- The following kinds of search terms can be used. Remember these can
+ The following kinds of search terms can be used. Remember these can
also be prefixed with not:, eg to exclude a particular subaccount.
REGEX, acct:REGEX
- match account names by this regular expression. (With no pre-
+ match account names by this regular expression. (With no pre-
fix, acct: is assumed.) same as above
amt:N, amt:<N, amt:<=N, amt:>N, amt:>=N
- match postings with a single-commodity amount that is equal to,
- less than, or greater than N. (Multi-commodity amounts are not
+ match postings with a single-commodity amount that is equal to,
+ less than, or greater than N. (Multi-commodity amounts are not
tested, and will always match.) The comparison has two modes: if
N is preceded by a + or - sign (or is 0), the two signed numbers
- are compared. Otherwise, the absolute magnitudes are compared,
+ are compared. Otherwise, the absolute magnitudes are compared,
ignoring sign.
code:REGEX
match by transaction code (eg check number)
cur:REGEX
- match postings or transactions including any amounts whose cur-
- rency/commodity symbol is fully matched by REGEX. (For a par-
+ match postings or transactions including any amounts whose cur-
+ rency/commodity symbol is fully matched by REGEX. (For a par-
tial match, use .*REGEX.*). Note, to match characters which are
regex-significant, like the dollar sign ($), you need to prepend
- \. And when using the command line you need to add one more
- level of quoting to hide it from the shell, so eg do: hledger
+ \. And when using the command line you need to add one more
+ level of quoting to hide it from the shell, so eg do: hledger
print cur:'\$' or hledger print cur:\\$.
desc:REGEX
@@ -1069,20 +1114,20 @@ QUERIES
date:PERIODEXPR
match dates within the specified period. PERIODEXPR is a period
- expression (with no report interval). Examples: date:2016,
- date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the
- --date2 command line flag is present, this matches secondary
+ expression (with no report interval). Examples: date:2016,
+ date:thismonth, date:2000/2/1-2/15, date:lastweek-. If the
+ --date2 command line flag is present, this matches secondary
dates instead.
date2:PERIODEXPR
match secondary dates within the specified period.
depth:N
- match (or display, depending on command) accounts at or above
+ match (or display, depending on command) accounts at or above
this depth
note:REGEX
- match transaction notes (part of description right of |, or
+ match transaction notes (part of description right of |, or
whole description when there's no |)
payee:REGEX
@@ -1096,51 +1141,51 @@ QUERIES
match unmarked, pending, or cleared transactions respectively
tag:REGEX[=REGEX]
- match by tag name, and optionally also by tag value. Note a
- tag: query is considered to match a transaction if it matches
- any of the postings. Also remember that postings inherit the
+ match by tag name, and optionally also by tag value. Note a
+ tag: query is considered to match a transaction if it matches
+ any of the postings. Also remember that postings inherit the
tags of their parent transaction.
The following special search term is used automatically in hledger-web,
only:
inacct:ACCTNAME
- tells hledger-web to show the transaction register for this ac-
+ tells hledger-web to show the transaction register for this ac-
count. Can be filtered further with acct etc.
Some of these can also be expressed as command-line options (eg depth:2
- is equivalent to --depth 2). Generally you can mix options and query
- arguments, and the resulting query will be their intersection (perhaps
+ is equivalent to --depth 2). Generally you can mix options and query
+ arguments, and the resulting query will be their intersection (perhaps
excluding the -p/--period option).
COMMANDS
- hledger provides a number of subcommands; hledger with no arguments
+ hledger provides a number of subcommands; hledger with no arguments
shows a list.
If you install additional hledger-* packages, or if you put programs or
- scripts named hledger-NAME in your PATH, these will also be listed as
+ scripts named hledger-NAME in your PATH, these will also be listed as
subcommands.
- Run a subcommand by writing its name as first argument (eg hledger in-
- comestatement). You can also write one of the standard short aliases
- displayed in parentheses in the command list (hledger b), or any any
+ Run a subcommand by writing its name as first argument (eg hledger in-
+ comestatement). You can also write one of the standard short aliases
+ displayed in parentheses in the command list (hledger b), or any any
unambiguous prefix of a command name (hledger inc).
- Here are all the builtin commands in alphabetical order. See also
- hledger for a more organised command list, and hledger CMD -h for de-
+ Here are all the builtin commands in alphabetical order. See also
+ hledger for a more organised command list, and hledger CMD -h for de-
tailed command help.
accounts
accounts, a
Show account names.
- This command lists account names, either declared with account direc-
- tives (--declared), posted to (--used), or both (the default). With
- query arguments, only matched account names and account names refer-
- enced by matched postings are shown. It shows a flat list by default.
- With --tree, it uses indentation to show the account hierarchy. In
- flat mode you can add --drop N to omit the first few account name com-
- ponents. Account names can be depth-clipped with depth:N or --depth N
+ This command lists account names, either declared with account direc-
+ tives (--declared), posted to (--used), or both (the default). With
+ query arguments, only matched account names and account names refer-
+ enced by matched postings are shown. It shows a flat list by default.
+ With --tree, it uses indentation to show the account hierarchy. In
+ flat mode you can add --drop N to omit the first few account name com-
+ ponents. Account names can be depth-clipped with depth:N or --depth N
or -N.
Examples:
@@ -1159,8 +1204,8 @@ COMMANDS
activity
Show an ascii barchart of posting counts per interval.
- The activity command displays an ascii histogram showing transaction
- counts by day, week, month or other reporting interval (by day is the
+ The activity command displays an ascii histogram showing transaction
+ counts by day, week, month or other reporting interval (by day is the
default). With query arguments, it counts only matched transactions.
Examples:
@@ -1175,22 +1220,22 @@ COMMANDS
add
Prompt for transactions and add them to the journal.
- Many hledger users edit their journals directly with a text editor, or
- generate them from CSV. For more interactive data entry, there is the
- add command, which prompts interactively on the console for new trans-
+ Many hledger users edit their journals directly with a text editor, or
+ generate them from CSV. For more interactive data entry, there is the
+ add command, which prompts interactively on the console for new trans-
actions, and appends them to the journal file (if there are multiple -f
- FILE options, the first file is used.) Existing transactions are not
- changed. This is the only hledger command that writes to the journal
+ FILE options, the first file is used.) Existing transactions are not
+ changed. This is the only hledger command that writes to the journal
file.
To use it, just run hledger add and follow the prompts. You can add as
- many transactions as you like; when you are finished, enter . or press
+ many transactions as you like; when you are finished, enter . or press
control-d or control-c to exit.
Features:
- o add tries to provide useful defaults, using the most similar (by de-
- scription) recent transaction (filtered by the query, if any) as a
+ o add tries to provide useful defaults, using the most similar (by de-
+ scription) recent transaction (filtered by the query, if any) as a
template.
o You can also set the initial defaults with command line arguments.
@@ -1198,20 +1243,20 @@ COMMANDS
o Readline-style edit keys can be used during data entry.
o The tab key will auto-complete whenever possible - accounts, descrip-
- tions, dates (yesterday, today, tomorrow). If the input area is
+ tions, dates (yesterday, today, tomorrow). If the input area is
empty, it will insert the default value.
- o If the journal defines a default commodity, it will be added to any
+ o If the journal defines a default commodity, it will be added to any
bare numbers entered.
o A parenthesised transaction code may be entered following a date.
o Comments and tags may be entered following a description or amount.
- o If you make a mistake, enter < at any prompt to restart the transac-
+ o If you make a mistake, enter < at any prompt to restart the transac-
tion.
- o Input prompts are displayed in a different colour when the terminal
+ o Input prompts are displayed in a different colour when the terminal
supports it.
Example (see the tutorial for a detailed explanation):
@@ -1241,8 +1286,8 @@ COMMANDS
Starting the next transaction (. or ctrl-D/ctrl-C to quit)
Date [2015/05/22]: <CTRL-D> $
- On Microsoft Windows, the add command makes sure that no part of the
- file path ends with a period, as it can cause data loss on that plat-
+ On Microsoft Windows, the add command makes sure that no part of the
+ file path ends with a period, as it can cause data loss on that plat-
form (cf #1056).
balance
@@ -1250,29 +1295,29 @@ COMMANDS
Show accounts and their balances.
The balance command is hledger's most versatile command. Note, despite
- the name, it is not always used for showing real-world account bal-
- ances; the more accounting-aware balancesheet and incomestatement may
+ the name, it is not always used for showing real-world account bal-
+ ances; the more accounting-aware balancesheet and incomestatement may
be more convenient for that.
By default, it displays all accounts, and each account's change in bal-
ance during the entire period of the journal. Balance changes are cal-
- culated by adding up the postings in each account. You can limit the
- postings matched, by a query, to see fewer accounts, changes over a
+ culated by adding up the postings in each account. You can limit the
+ postings matched, by a query, to see fewer accounts, changes over a
different time period, changes from only cleared transactions, etc.
If you include an account's complete history of postings in the report,
- the balance change is equivalent to the account's current ending bal-
- ance. For a real-world account, typically you won't have all transac-
+ the balance change is equivalent to the account's current ending bal-
+ ance. For a real-world account, typically you won't have all transac-
tions in the journal; instead you'll have all transactions after a cer-
- tain date, and an "opening balances" transaction setting the correct
- starting balance on that date. Then the balance command will show
+ tain date, and an "opening balances" transaction setting the correct
+ starting balance on that date. Then the balance command will show
real-world account balances. In some cases the -H/--historical flag is
used to ensure this (more below).
The balance command can produce several styles of report:
Classic balance report
- This is the original balance report, as found in Ledger. It usually
+ This is the original balance report, as found in Ledger. It usually
looks like this:
$ hledger balance
@@ -1290,22 +1335,22 @@ COMMANDS
0
By default, accounts are displayed hierarchically, with subaccounts in-
- dented below their parent. At each level of the tree, accounts are
- sorted by account code if any, then by account name. Or with
+ dented below their parent. At each level of the tree, accounts are
+ sorted by account code if any, then by account name. Or with
-S/--sort-amount, by their balance amount.
"Boring" accounts, which contain a single interesting subaccount and no
- balance of their own, are elided into the following line for more com-
- pact output. (Eg above, the "liabilities" account.) Use --no-elide to
+ balance of their own, are elided into the following line for more com-
+ pact output. (Eg above, the "liabilities" account.) Use --no-elide to
prevent this.
- Account balances are "inclusive" - they include the balances of any
+ Account balances are "inclusive" - they include the balances of any
subaccounts.
- Accounts which have zero balance (and no non-zero subaccounts) are
+ Accounts which have zero balance (and no non-zero subaccounts) are
omitted. Use -E/--empty to show them.
- A final total is displayed by default; use -N/--no-total to suppress
+ A final total is displayed by default; use -N/--no-total to suppress
it, eg:
$ hledger balance -p 2008/6 expenses --no-total
@@ -1314,7 +1359,7 @@ COMMANDS
$1 supplies
Customising the classic balance report
- You can customise the layout of classic balance reports with --format
+ You can customise the layout of classic balance reports with --format
FMT:
$ hledger balance --format "%20(account) %12(total)"
@@ -1332,7 +1377,7 @@ COMMANDS
0
The FMT format string (plus a newline) specifies the formatting applied
- to each account/balance pair. It may contain any suitable text, with
+ to each account/balance pair. It may contain any suitable text, with
data fields interpolated like so:
%[MIN][.MAX](FIELDNAME)
@@ -1343,14 +1388,14 @@ COMMANDS
o FIELDNAME must be enclosed in parentheses, and can be one of:
- o depth_spacer - a number of spaces equal to the account's depth, or
+ o depth_spacer - a number of spaces equal to the account's depth, or
if MIN is specified, MIN * depth spaces.
o account - the account's name
o total - the account's balance/posted total, right justified
- Also, FMT can begin with an optional prefix to control how multi-com-
+ Also, FMT can begin with an optional prefix to control how multi-com-
modity amounts are rendered:
o %_ - render on multiple lines, bottom-aligned (the default)
@@ -1367,14 +1412,14 @@ COMMANDS
o %(total) - the account's total
- o %-20.20(account) - the account's name, left justified, padded to 20
+ o %-20.20(account) - the account's name, left justified, padded to 20
characters and clipped at 20 characters
- o %,%-50(account) %25(total) - account name padded to 50 characters,
- total padded to 20 characters, with multiple commodities rendered on
+ o %,%-50(account) %25(total) - account name padded to 50 characters,
+ total padded to 20 characters, with multiple commodities rendered on
one line
- o %20(total) %2(depth_spacer)%-(account) - the default format for the
+ o %20(total) %2(depth_spacer)%-(account) - the default format for the
single-column balance report
Colour support
@@ -1385,9 +1430,9 @@ COMMANDS
o the output is not being redirected or piped anywhere
Flat mode
- To see a flat list instead of the default hierarchical display, use
- --flat. In this mode, accounts (unless depth-clipped) show their full
- names and "exclusive" balance, excluding any subaccount balances. In
+ To see a flat list instead of the default hierarchical display, use
+ --flat. In this mode, accounts (unless depth-clipped) show their full
+ names and "exclusive" balance, excluding any subaccount balances. In
this mode, you can also use --drop N to omit the first few account name
components.
@@ -1396,8 +1441,8 @@ COMMANDS
$1 supplies
Depth limited balance reports
- With --depth N or depth:N or just -N, balance reports show accounts
- only to the specified numeric depth. This is very useful to summarise
+ With --depth N or depth:N or just -N, balance reports show accounts
+ only to the specified numeric depth. This is very useful to summarise
a complex set of accounts and get an overview.
$ hledger balance -N -1
@@ -1410,17 +1455,17 @@ COMMANDS
inclusive balances at the depth limit.
Multicolumn balance report
- Multicolumn or tabular balance reports are a very useful hledger fea-
- ture, and usually the preferred style. They share many of the above
- features, but they show the report as a table, with columns represent-
- ing time periods. This mode is activated by providing a reporting in-
+ Multicolumn or tabular balance reports are a very useful hledger fea-
+ ture, and usually the preferred style. They share many of the above
+ features, but they show the report as a table, with columns represent-
+ ing time periods. This mode is activated by providing a reporting in-
terval.
- There are three types of multicolumn balance report, showing different
+ There are three types of multicolumn balance report, showing different
information:
1. By default: each column shows the sum of postings in that period, ie
- the account's change of balance in that period. This is useful eg
+ the account's change of balance in that period. This is useful eg
for a monthly income statement:
$ hledger balance --quarterly income expenses -E
@@ -1436,7 +1481,7 @@ COMMANDS
|| $-1 $1 0 0
2. With --cumulative: each column shows the ending balance for that pe-
- riod, accumulating the changes across periods, starting from 0 at
+ riod, accumulating the changes across periods, starting from 0 at
the report start date:
$ hledger balance --quarterly income expenses -E --cumulative
@@ -1452,8 +1497,8 @@ COMMANDS
|| $-1 0 0 0
3. With --historical/-H: each column shows the actual historical ending
- balance for that period, accumulating the changes across periods,
- starting from the actual balance at the report start date. This is
+ balance for that period, accumulating the changes across periods,
+ starting from the actual balance at the report start date. This is
useful eg for a multi-period balance sheet, and when you are showing
only the data after a certain start date:
@@ -1472,26 +1517,26 @@ COMMANDS
Note that --cumulative or --historical/-H disable --row-total/-T, since
summing end balances generally does not make sense.
- Multicolumn balance reports display accounts in flat mode by default;
+ Multicolumn balance reports display accounts in flat mode by default;
to see the hierarchy, use --tree.
- With a reporting interval (like --quarterly above), the report
- start/end dates will be adjusted if necessary so that they encompass
+ With a reporting interval (like --quarterly above), the report
+ start/end dates will be adjusted if necessary so that they encompass
the displayed report periods. This is so that the first and last peri-
ods will be "full" and comparable to the others.
- The -E/--empty flag does two things in multicolumn balance reports:
+ The -E/--empty flag does two things in multicolumn balance reports:
first, the report will show all columns within the specified report pe-
- riod (without -E, leading and trailing columns with all zeroes are not
- shown). Second, all accounts which existed at the report start date
- will be considered, not just the ones with activity during the report
- period (use -E to include low-activity accounts which would otherwise
+ riod (without -E, leading and trailing columns with all zeroes are not
+ shown). Second, all accounts which existed at the report start date
+ will be considered, not just the ones with activity during the report
+ period (use -E to include low-activity accounts which would otherwise
would be omitted).
The -T/--row-total flag adds an additional column showing the total for
each row.
- The -A/--average flag adds a column showing the average value in each
+ The -A/--average flag adds a column showing the average value in each
row.
Here's an example of all three:
@@ -1515,20 +1560,20 @@ COMMANDS
Limitations:
In multicolumn reports the -V/--value flag uses the market price on the
- report end date, for all columns (not the price on each column's end
+ report end date, for all columns (not the price on each column's end
date).
- Eliding of boring parent accounts in tree mode, as in the classic bal-
+ Eliding of boring parent accounts in tree mode, as in the classic bal-
ance report, is not yet supported in multicolumn reports.
Budget report
- With --budget, extra columns are displayed showing budget goals for
- each account and period, if any. Budget goals are defined by periodic
+ With --budget, extra columns are displayed showing budget goals for
+ each account and period, if any. Budget goals are defined by periodic
transactions. This is very useful for comparing planned and actual in-
- come, expenses, time usage, etc. --budget is most often combined with
+ come, expenses, time usage, etc. --budget is most often combined with
a report interval.
- For example, you can take average monthly expenses in the common ex-
+ For example, you can take average monthly expenses in the common ex-
pense categories to construct a minimal monthly budget:
;; Budget
@@ -1575,25 +1620,25 @@ COMMANDS
Note this is different from a normal balance report in several ways:
- o Only accounts with budget goals during the report period are shown,
+ o Only accounts with budget goals during the report period are shown,
by default.
- o In each column, in square brackets after the actual amount, budgeted
+ o In each column, in square brackets after the actual amount, budgeted
amounts are shown, along with the percentage of budget used.
- o All parent accounts are always shown, even in flat mode. Eg assets,
+ o All parent accounts are always shown, even in flat mode. Eg assets,
assets:bank, and expenses above.
- o Amounts always include all subaccounts, budgeted or unbudgeted, even
+ o Amounts always include all subaccounts, budgeted or unbudgeted, even
in flat mode.
This means that the numbers displayed will not always add up! Eg above,
- the expenses actual amount includes the gifts and supplies transac-
- tions, but the expenses:gifts and expenses:supplies accounts are not
+ the expenses actual amount includes the gifts and supplies transac-
+ tions, but the expenses:gifts and expenses:supplies accounts are not
shown, as they have no budget amounts declared.
- This can be confusing. When you need to make things clearer, use the
- -E/--empty flag, which will reveal all accounts including unbudgeted
+ This can be confusing. When you need to make things clearer, use the
+ -E/--empty flag, which will reveal all accounts including unbudgeted
ones, giving the full picture. Eg:
$ hledger balance -M --budget --empty
@@ -1635,12 +1680,12 @@ COMMANDS
For more examples, see Budgeting and Forecasting.
Nested budgets
- You can add budgets to any account in your account hierarchy. If you
+ You can add budgets to any account in your account hierarchy. If you
have budgets on both parent account and some of its children, then bud-
- get(s) of the child account(s) would be added to the budget of their
+ get(s) of the child account(s) would be added to the budget of their
parent, much like account balances behave.
- In the most simple case this means that once you add a budget to any
+ In the most simple case this means that once you add a budget to any
account, all its parents would have budget as well.
To illustrate this, consider the following budget:
@@ -1650,13 +1695,13 @@ COMMANDS
expenses:personal:electronics $100.00
liabilities
- With this, monthly budget for electronics is defined to be $100 and
- budget for personal expenses is an additional $1000, which implicity
+ With this, monthly budget for electronics is defined to be $100 and
+ budget for personal expenses is an additional $1000, which implicity
means that budget for both expenses:personal and expenses is $1100.
- Transactions in expenses:personal:electronics will be counted both to-
+ Transactions in expenses:personal:electronics will be counted both to-
wards its $100 budget and $1100 of expenses:personal , and transactions
- in any other subaccount of expenses:personal would be counted towards
+ in any other subaccount of expenses:personal would be counted towards
only towards the budget of expenses:personal.
For example, let's consider these transactions:
@@ -1682,9 +1727,9 @@ COMMANDS
expenses:personal $30.00
liabilities
- As you can see, we have transactions in expenses:personal:electron-
- ics:upgrades and expenses:personal:train tickets, and since both of
- these accounts are without explicitly defined budget, these transac-
+ As you can see, we have transactions in expenses:personal:electron-
+ ics:upgrades and expenses:personal:train tickets, and since both of
+ these accounts are without explicitly defined budget, these transac-
tions would be counted towards budgets of expenses:personal:electronics
and expenses:personal accordingly:
@@ -1700,7 +1745,7 @@ COMMANDS
-------------------------------++-------------------------------
|| 0 [ 0]
- And with --empty, we can get a better picture of budget allocation and
+ And with --empty, we can get a better picture of budget allocation and
consumption:
$ hledger balance --budget -M --empty
@@ -1718,17 +1763,17 @@ COMMANDS
|| 0 [ 0]
Output format
- The balance command supports output destination and output format se-
+ The balance command supports output destination and output format se-
lection.
balancesheet
balancesheet, bs
This command displays a simple balance sheet, showing historical ending
- balances of asset and liability accounts (ignoring any report begin
- date). It assumes that these accounts are under a top-level asset or
+ balances of asset and liability accounts (ignoring any report begin
+ date). It assumes that these accounts are under a top-level asset or
liability account (case insensitive, plural forms also allowed).
- Note this report shows all account balances with normal positive sign
+ Note this report shows all account balances with normal positive sign
(like conventional financial statements, unlike balance/print/register)
(experimental).
@@ -1754,19 +1799,19 @@ COMMANDS
0
With a reporting interval, multiple columns will be shown, one for each
- report period. As with multicolumn balance reports, you can alter the
- report mode with --change/--cumulative/--historical. Normally bal-
- ancesheet shows historical ending balances, which is what you need for
- a balance sheet; note this means it ignores report begin dates (and
- -T/--row-total, since summing end balances generally does not make
+ report period. As with multicolumn balance reports, you can alter the
+ report mode with --change/--cumulative/--historical. Normally bal-
+ ancesheet shows historical ending balances, which is what you need for
+ a balance sheet; note this means it ignores report begin dates (and
+ -T/--row-total, since summing end balances generally does not make
sense).
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
balancesheetequity
balancesheetequity, bse
- Just like balancesheet, but also reports Equity (which it assumes is
+ Just like balancesheet, but also reports Equity (which it assumes is
under a top-level equity account).
Example:
@@ -1797,10 +1842,10 @@ COMMANDS
cashflow
cashflow, cf
- This command displays a simple cashflow statement, showing changes in
- "cash" accounts. It assumes that these accounts are under a top-level
- asset account (case insensitive, plural forms also allowed) and do not
- contain receivable or A/R in their name. Note this report shows all
+ This command displays a simple cashflow statement, showing changes in
+ "cash" accounts. It assumes that these accounts are under a top-level
+ asset account (case insensitive, plural forms also allowed) and do not
+ contain receivable or A/R in their name. Note this report shows all
account balances with normal positive sign (like conventional financial
statements, unlike balance/print/register) (experimental).
@@ -1821,81 +1866,81 @@ COMMANDS
$-1
With a reporting interval, multiple columns will be shown, one for each
- report period. Normally cashflow shows changes in assets per period,
- though as with multicolumn balance reports you can alter the report
+ report period. Normally cashflow shows changes in assets per period,
+ though as with multicolumn balance reports you can alter the report
mode with --change/--cumulative/--historical.
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
check-dates
check-dates
- Check that transactions are sorted by increasing date. With --date2,
- checks secondary dates instead. With --strict, dates must also be
- unique. With a query, only matched transactions' dates are checked.
+ Check that transactions are sorted by increasing date. With --date2,
+ checks secondary dates instead. With --strict, dates must also be
+ unique. With a query, only matched transactions' dates are checked.
Reads the default journal file, or another specified with -f.
check-dupes
check-dupes
- Reports account names having the same leaf but different prefixes. In
- other words, two or more leaves that are categorized differently.
+ Reports account names having the same leaf but different prefixes. In
+ other words, two or more leaves that are categorized differently.
Reads the default journal file, or another specified as an argument.
An example: http://stefanorodighiero.net/software/hledger-dupes.html
close
close, equity
- Prints a "closing balances" transaction and an "opening balances"
+ Prints a "closing balances" transaction and an "opening balances"
transaction that bring account balances to and from zero, respectively.
Useful for bringing asset/liability balances forward into a new journal
- file, or for closing out revenues/expenses to retained earnings at the
+ file, or for closing out revenues/expenses to retained earnings at the
end of a period.
- The closing transaction transfers balances to "equity:closing bal-
- ances". The opening transaction transfers balances from "equity:open-
+ The closing transaction transfers balances to "equity:closing bal-
+ ances". The opening transaction transfers balances from "equity:open-
ing balances". You can choose to print just one of the transactions by
using the --opening or --closing flag.
If you split your journal files by time (eg yearly), you will typically
- run this command at the end of the year, and save the closing transac-
- tion as last entry of the old file, and the opening transaction as the
- first entry of the new file. This makes the files self contained, so
- that correct balances are reported no matter which of them are loaded.
- Ie, if you load just one file, the balances are initialised correctly;
- or if you load several files, the redundant closing/opening transac-
- tions cancel each other out. (They will show up in print or register
- reports; you can exclude them with a query like not:desc:'(open-
+ run this command at the end of the year, and save the closing transac-
+ tion as last entry of the old file, and the opening transaction as the
+ first entry of the new file. This makes the files self contained, so
+ that correct balances are reported no matter which of them are loaded.
+ Ie, if you load just one file, the balances are initialised correctly;
+ or if you load several files, the redundant closing/opening transac-
+ tions cancel each other out. (They will show up in print or register
+ reports; you can exclude them with a query like not:desc:'(open-
ing|closing) balances'.)
If you're running a business, you might also use this command to "close
- the books" at the end of an accounting period, transferring income
- statement account balances to retained earnings. (You may want to
+ the books" at the end of an accounting period, transferring income
+ statement account balances to retained earnings. (You may want to
change the equity account name to something like "equity:retained earn-
ings".)
- By default, the closing transaction is dated yesterday, the balances
- are calculated as of end of yesterday, and the opening transaction is
- dated today. To close on some other date, use: hledger close -e OPEN-
- INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019.
+ By default, the closing transaction is dated yesterday, the balances
+ are calculated as of end of yesterday, and the opening transaction is
+ dated today. To close on some other date, use: hledger close -e OPEN-
+ INGDATE. Eg, to close/open on the 2018/2019 boundary, use -e 2019.
You can also use -p or date:PERIOD (any starting date is ignored).
- Both transactions will include balance assertions for the closed/re-
+ Both transactions will include balance assertions for the closed/re-
opened accounts. You probably shouldn't use status or realness filters
- (like -C or -R or status:) with this command, or the generated balance
- assertions will depend on these flags. Likewise, if you run this com-
- mand with --auto, the balance assertions will probably always require
+ (like -C or -R or status:) with this command, or the generated balance
+ assertions will depend on these flags. Likewise, if you run this com-
+ mand with --auto, the balance assertions will probably always require
--auto.
- When account balances have cost information (transaction prices), the
- closing/opening transactions will preserve it, so that eg balance -B
+ When account balances have cost information (transaction prices), the
+ closing/opening transactions will preserve it, so that eg balance -B
reports will not be affected.
Examples:
- Carrying asset/liability balances into a new file for 2019, all from
+ Carrying asset/liability balances into a new file for 2019, all from
command line:
- Warning: we use >> here to append; be careful not to type a single >
+ Warning: we use >> here to append; be careful not to type a single >
which would wipe your journal!
$ hledger close -f 2018.journal -e 2019 assets liabilities --opening >>2019.journal
@@ -1944,18 +1989,18 @@ COMMANDS
diff
diff
- Compares a particular account's transactions in two input files. It
+ Compares a particular account's transactions in two input files. It
shows any transactions to this account which are in one file but not in
the other.
More precisely, for each posting affecting this account in either file,
- it looks for a corresponding posting in the other file which posts the
- same amount to the same account (ignoring date, description, etc.)
+ it looks for a corresponding posting in the other file which posts the
+ same amount to the same account (ignoring date, description, etc.)
Since postings not transactions are compared, this also works when mul-
tiple bank transactions have been combined into a single journal entry.
This is useful eg if you have downloaded an account's transactions from
- your bank (eg as CSV data). When hledger and your bank disagree about
+ your bank (eg as CSV data). When hledger and your bank disagree about
the account balance, you can compare the bank data with your journal to
find out the cause.
@@ -1973,20 +2018,20 @@ COMMANDS
files
files
- List all files included in the journal. With a REGEX argument, only
+ List all files included in the journal. With a REGEX argument, only
file names matching the regular expression (case sensitive) are shown.
help
help
Show any of the hledger manuals.
- The help command displays any of the main hledger manuals, in one of
- several ways. Run it with no argument to list the manuals, or provide
+ The help command displays any of the main hledger manuals, in one of
+ several ways. Run it with no argument to list the manuals, or provide
a full or partial manual name to select one.
- hledger manuals are available in several formats. hledger help will
- use the first of these display methods that it finds: info, man,
- $PAGER, less, stdout (or when non-interactive, just stdout). You can
+ hledger manuals are available in several formats. hledger help will
+ use the first of these display methods that it finds: info, man,
+ $PAGER, less, stdout (or when non-interactive, just stdout). You can
force a particular viewer with the --info, --man, --pager, --cat flags.
Examples:
@@ -2013,8 +2058,8 @@ COMMANDS
import
import
- Read new transactions added to each FILE since last run, and add them
- to the main journal file. Or with --dry-run, just print the transac-
+ Read new transactions added to each FILE since last run, and add them
+ to the main journal file. Or with --dry-run, just print the transac-
tions that would be added.
The input files are specified as arguments - no need to write -f before
@@ -2025,36 +2070,36 @@ COMMANDS
ing transactions are always added to the input files in increasing date
order, and by saving .latest.FILE state files.
- The --dry-run output is in journal format, so you can filter it, eg to
+ The --dry-run output is in journal format, so you can filter it, eg to
see only uncategorised transactions:
$ hledger import --dry ... | hledger -f- print unknown --ignore-assertions
Importing balance assignments
- Entries added by import will have their posting amounts made explicit
- (like hledger print -x). This means that any balance assignments in
- imported files must be evaluated; but, imported files don't get to see
- the main file's account balances. As a result, importing entries with
+ Entries added by import will have their posting amounts made explicit
+ (like hledger print -x). This means that any balance assignments in
+ imported files must be evaluated; but, imported files don't get to see
+ the main file's account balances. As a result, importing entries with
balance assignments (eg from an institution that provides only balances
- and not posting amounts) will probably generate incorrect posting
+ and not posting amounts) will probably generate incorrect posting
amounts. To avoid this problem, use print instead of import:
$ hledger print IMPORTFILE [--new] >> $LEDGER_FILE
- (If you think import should leave amounts implicit like print does,
+ (If you think import should leave amounts implicit like print does,
please test it and send a pull request.)
incomestatement
incomestatement, is
- This command displays a simple income statement, showing revenues and
- expenses during a period. It assumes that these accounts are under a
- top-level revenue or income or expense account (case insensitive, plu-
- ral forms also allowed). Note this report shows all account balances
- with normal positive sign (like conventional financial statements, un-
+ This command displays a simple income statement, showing revenues and
+ expenses during a period. It assumes that these accounts are under a
+ top-level revenue or income or expense account (case insensitive, plu-
+ ral forms also allowed). Note this report shows all account balances
+ with normal positive sign (like conventional financial statements, un-
like balance/print/register) (experimental).
- This command displays a simple income statement. It currently assumes
- that you have top-level accounts named income (or revenue) and expense
+ This command displays a simple income statement. It currently assumes
+ that you have top-level accounts named income (or revenue) and expense
(plural forms also allowed.)
$ hledger incomestatement
@@ -2079,11 +2124,11 @@ COMMANDS
0
With a reporting interval, multiple columns will be shown, one for each
- report period. Normally incomestatement shows revenues/expenses per
- period, though as with multicolumn balance reports you can alter the
+ report period. Normally incomestatement shows revenues/expenses per
+ period, though as with multicolumn balance reports you can alter the
report mode with --change/--cumulative/--historical.
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
notes
@@ -2111,9 +2156,9 @@ COMMANDS
prices
prices
- Print market price directives from the journal. With --costs, also
- print synthetic market prices based on transaction prices. With --in-
- verted-costs, also print inverse prices based on transaction prices.
+ Print market price directives from the journal. With --costs, also
+ print synthetic market prices based on transaction prices. With --in-
+ verted-costs, also print inverse prices based on transaction prices.
Prices (and postings providing prices) can be filtered by a query.
print
@@ -2121,11 +2166,11 @@ COMMANDS
Show transaction journal entries, sorted by date.
The print command displays full journal entries (transactions) from the
- journal file in date order, tidily formatted. With --date2, transac-
+ journal file in date order, tidily formatted. With --date2, transac-
tions are sorted by secondary date instead.
print's output is always a valid hledger journal.
- It preserves all transaction information, but it does not preserve di-
+ It preserves all transaction information, but it does not preserve di-
rectives or inter-transaction comments
$ hledger print
@@ -2151,39 +2196,39 @@ COMMANDS
assets:bank:checking $-1
Normally, the journal entry's explicit or implicit amount style is pre-
- served. Ie when an amount is omitted in the journal, it will be omit-
- ted in the output. You can use the -x/--explicit flag to make all
+ served. Ie when an amount is omitted in the journal, it will be omit-
+ ted in the output. You can use the -x/--explicit flag to make all
amounts explicit, which can be useful for troubleshooting or for making
your journal more readable and robust against data entry errors. Note,
- -x will cause postings with a multi-commodity amount (these can arise
- when a multi-commodity transaction has an implicit amount) will be
- split into multiple single-commodity postings, for valid journal out-
+ -x will cause postings with a multi-commodity amount (these can arise
+ when a multi-commodity transaction has an implicit amount) will be
+ split into multiple single-commodity postings, for valid journal out-
put.
- With -B/--cost, amounts with transaction prices are converted to cost
+ With -B/--cost, amounts with transaction prices are converted to cost
using that price. This can be used for troubleshooting.
- With -m/--match and a STR argument, print will show at most one trans-
- action: the one one whose description is most similar to STR, and is
- most recent. STR should contain at least two characters. If there is
+ With -m/--match and a STR argument, print will show at most one trans-
+ action: the one one whose description is most similar to STR, and is
+ most recent. STR should contain at least two characters. If there is
no similar-enough match, no transaction will be shown.
With --new, for each FILE being read, hledger reads (and writes) a spe-
- cial state file (.latest.FILE in the same directory), containing the
- latest transaction date(s) that were seen last time FILE was read.
- When this file is found, only transactions with newer dates (and new
- transactions on the latest date) are printed. This is useful for ig-
- noring already-seen entries in import data, such as downloaded CSV
+ cial state file (.latest.FILE in the same directory), containing the
+ latest transaction date(s) that were seen last time FILE was read.
+ When this file is found, only transactions with newer dates (and new
+ transactions on the latest date) are printed. This is useful for ig-
+ noring already-seen entries in import data, such as downloaded CSV
files. Eg:
$ hledger -f bank1.csv print --new
# shows transactions added since last print --new on this file
- This assumes that transactions added to FILE always have same or in-
- creasing dates, and that transactions on the same day do not get re-
+ This assumes that transactions added to FILE always have same or in-
+ creasing dates, and that transactions on the same day do not get re-
ordered. See also the import command.
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion. Here's an example of print's CSV output:
$ hledger print -Ocsv
@@ -2200,20 +2245,20 @@ COMMANDS
"5","2008/12/31","","*","","pay off","","liabilities:debts","1","$","","1","",""
"5","2008/12/31","","*","","pay off","","assets:bank:checking","-1","$","1","","",""
- o There is one CSV record per posting, with the parent transaction's
+ o There is one CSV record per posting, with the parent transaction's
fields repeated.
o The "txnidx" (transaction index) field shows which postings belong to
- the same transaction. (This number might change if transactions are
- reordered within the file, files are parsed/included in a different
+ the same transaction. (This number might change if transactions are
+ reordered within the file, files are parsed/included in a different
order, etc.)
- o The amount is separated into "commodity" (the symbol) and "amount"
+ o The amount is separated into "commodity" (the symbol) and "amount"
(numeric quantity) fields.
o The numeric amount is repeated in either the "credit" or "debit" col-
- umn, for convenience. (Those names are not accurate in the account-
- ing sense; it just puts negative amounts under credit and zero or
+ umn, for convenience. (Those names are not accurate in the account-
+ ing sense; it just puts negative amounts under credit and zero or
greater amounts under debit.)
print-unique
@@ -2237,7 +2282,7 @@ COMMANDS
Show postings and their running total.
The register command displays postings in date order, one per line, and
- their running total. This is typically used with a query selecting a
+ their running total. This is typically used with a query selecting a
particular account, to see that account's activity:
$ hledger register checking
@@ -2248,8 +2293,8 @@ COMMANDS
With --date2, it shows and sorts by secondary date instead.
- The --historical/-H flag adds the balance from any undisplayed prior
- postings to the running total. This is useful when you want to see
+ The --historical/-H flag adds the balance from any undisplayed prior
+ postings to the running total. This is useful when you want to see
only recent activity, with a historically accurate running balance:
$ hledger register checking -b 2008/6 --historical
@@ -2259,18 +2304,18 @@ COMMANDS
The --depth option limits the amount of sub-account detail displayed.
- The --average/-A flag shows the running average posting amount instead
+ The --average/-A flag shows the running average posting amount instead
of the running total (so, the final number displayed is the average for
- the whole report period). This flag implies --empty (see below). It
- is affected by --historical. It works best when showing just one ac-
+ the whole report period). This flag implies --empty (see below). It
+ is affected by --historical. It works best when showing just one ac-
count and one commodity.
- The --related/-r flag shows the other postings in the transactions of
+ The --related/-r flag shows the other postings in the transactions of
the postings which would normally be shown.
- The --invert flag negates all amounts. For example, it can be used on
+ The --invert flag negates all amounts. For example, it can be used on
an income account where amounts are normally displayed as negative num-
- bers. It's also useful to show postings on the checking account to-
+ bers. It's also useful to show postings on the checking account to-
gether with the related account:
$ hledger register --related --invert assets:checking
@@ -2282,7 +2327,7 @@ COMMANDS
2008/01 income:salary $-1 $-1
2008/06 income:gifts $-1 $-2
- Periods with no activity, and summary postings with a zero amount, are
+ Periods with no activity, and summary postings with a zero amount, are
not shown by default; use the --empty/-E flag to see them:
$ hledger register --monthly income -E
@@ -2299,7 +2344,7 @@ COMMANDS
2008/11 0 $-2
2008/12 0 $-2
- Often, you'll want to see just one line per interval. The --depth op-
+ Often, you'll want to see just one line per interval. The --depth op-
tion helps with this, causing subaccounts to be aggregated:
$ hledger register --monthly assets --depth 1h
@@ -2307,17 +2352,17 @@ COMMANDS
2008/06 assets $-1 0
2008/12 assets $-1 $-1
- Note when using report intervals, if you specify start/end dates these
- will be adjusted outward if necessary to contain a whole number of in-
- tervals. This ensures that the first and last intervals are full
+ Note when using report intervals, if you specify start/end dates these
+ will be adjusted outward if necessary to contain a whole number of in-
+ tervals. This ensures that the first and last intervals are full
length and comparable to the others in the report.
Custom register output
- register uses the full terminal width by default, except on windows.
- You can override this by setting the COLUMNS environment variable (not
+ register uses the full terminal width by default, except on windows.
+ You can override this by setting the COLUMNS environment variable (not
a bash shell variable) or by using the --width/-w option.
- The description and account columns normally share the space equally
+ The description and account columns normally share the space equally
(about half of (width - 40) each). You can adjust this by adding a de-
scription width as part of --width's argument, comma-separated: --width
W,D . Here's a diagram (won't display correctly in --help):
@@ -2335,27 +2380,27 @@ COMMANDS
$ hledger reg -w 100,40 # set overall width 100, description width 40
$ hledger reg -w $COLUMNS,40 # use terminal width, & description width 40
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
register-match
register-match
Print the one posting whose transaction description is closest to DESC,
- in the style of the register command. If there are multiple equally
- good matches, it shows the most recent. Query options (options, not
- arguments) can be used to restrict the search space. Helps ledger-au-
+ in the style of the register command. If there are multiple equally
+ good matches, it shows the most recent. Query options (options, not
+ arguments) can be used to restrict the search space. Helps ledger-au-
tosync detect already-seen transactions when importing.
rewrite
rewrite
Print all transactions, rewriting the postings of matched transactions.
- For now the only rewrite available is adding new postings, like print
+ For now the only rewrite available is adding new postings, like print
--auto.
This is a start at a generic rewriter of transaction entries. It reads
- the default journal and prints the transactions, like print, but adds
+ the default journal and prints the transactions, like print, but adds
one or more specified postings to any transactions matching QUERY. The
- posting amounts can be fixed, or a multiplier of the existing transac-
+ posting amounts can be fixed, or a multiplier of the existing transac-
tion's first posting amount.
Examples:
@@ -2371,7 +2416,7 @@ COMMANDS
(reserve:grocery) *0.25 ; reserve 25% for grocery
(reserve:) *0.25 ; reserve 25% for grocery
- Note the single quotes to protect the dollar sign from bash, and the
+ Note the single quotes to protect the dollar sign from bash, and the
two spaces between account and amount.
More:
@@ -2381,16 +2426,16 @@ COMMANDS
$ hledger rewrite -- expenses:gifts --add-posting '(budget:gifts) *-1"'
$ hledger rewrite -- ^income --add-posting '(budget:foreign currency) *0.25 JPY; diversify'
- Argument for --add-posting option is a usual posting of transaction
- with an exception for amount specification. More precisely, you can
+ Argument for --add-posting option is a usual posting of transaction
+ with an exception for amount specification. More precisely, you can
use '*' (star symbol) before the amount to indicate that that this is a
- factor for an amount of original matched posting. If the amount in-
+ factor for an amount of original matched posting. If the amount in-
cludes a commodity name, the new posting amount will be in the new com-
- modity; otherwise, it will be in the matched posting amount's commod-
+ modity; otherwise, it will be in the matched posting amount's commod-
ity.
Re-write rules in a file
- During the run this tool will execute so called "Automated Transac-
+ During the run this tool will execute so called "Automated Transac-
tions" found in any journal it process. I.e instead of specifying this
operations in command line you can put them in a journal file.
@@ -2405,7 +2450,7 @@ COMMANDS
budget:gifts *-1
assets:budget *1
- Note that '=' (equality symbol) that is used instead of date in trans-
+ Note that '=' (equality symbol) that is used instead of date in trans-
actions you usually write. It indicates the query by which you want to
match the posting to add new ones.
@@ -2418,12 +2463,12 @@ COMMANDS
--add-posting 'assets:budget *1' \
> rewritten-tidy-output.journal
- It is important to understand that relative order of such entries in
- journal is important. You can re-use result of previously added post-
+ It is important to understand that relative order of such entries in
+ journal is important. You can re-use result of previously added post-
ings.
Diff output format
- To use this tool for batch modification of your journal files you may
+ To use this tool for batch modification of your journal files you may
find useful output in form of unified diff.
$ hledger rewrite -- --diff -f examples/sample.journal '^income' --add-posting '(liabilities:tax) *.33'
@@ -2447,10 +2492,10 @@ COMMANDS
If you'll pass this through patch tool you'll get transactions contain-
ing the posting that matches your query be updated. Note that multiple
- files might be update according to list of input files specified via
+ files might be update according to list of input files specified via
--file options and include directives inside of these files.
- Be careful. Whole transaction being re-formatted in a style of output
+ Be careful. Whole transaction being re-formatted in a style of output
from hledger print.
See also:
@@ -2458,48 +2503,48 @@ COMMANDS
https://github.com/simonmichael/hledger/issues/99
rewrite vs. print --auto
- This command predates print --auto, and currently does much the same
+ This command predates print --auto, and currently does much the same
thing, but with these differences:
- o with multiple files, rewrite lets rules in any file affect all other
- files. print --auto uses standard directive scoping; rules affect
+ o with multiple files, rewrite lets rules in any file affect all other
+ files. print --auto uses standard directive scoping; rules affect
only child files.
- o rewrite's query limits which transactions can be rewritten; all are
+ o rewrite's query limits which transactions can be rewritten; all are
printed. print --auto's query limits which transactions are printed.
- o rewrite applies rules specified on command line or in the journal.
+ o rewrite applies rules specified on command line or in the journal.
print --auto applies rules specified in the journal.
roi
roi
- Shows the time-weighted (TWR) and money-weighted (IRR) rate of return
+ Shows the time-weighted (TWR) and money-weighted (IRR) rate of return
on your investments.
- This command assumes that you have account(s) that hold nothing but
+ This command assumes that you have account(s) that hold nothing but
your investments and whenever you record current appraisal/valuation of
these investments you offset unrealized profit and loss into account(s)
that, again, hold nothing but unrealized profit and loss.
- Any transactions affecting balance of investment account(s) and not
- originating from unrealized profit and loss account(s) are assumed to
+ Any transactions affecting balance of investment account(s) and not
+ originating from unrealized profit and loss account(s) are assumed to
be your investments or withdrawals.
- At a minimum, you need to supply a query (which could be just an ac-
+ At a minimum, you need to supply a query (which could be just an ac-
count name) to select your investments with --inv, and another query to
identify your profit and loss transactions with --pnl.
- It will compute and display the internalized rate of return (IRR) and
- time-weighted rate of return (TWR) for your investments for the time
- period requested. Both rates of return are annualized before display,
+ It will compute and display the internalized rate of return (IRR) and
+ time-weighted rate of return (TWR) for your investments for the time
+ period requested. Both rates of return are annualized before display,
regardless of the length of reporting interval.
stats
stats
Show some journal statistics.
- The stats command displays summary information for the whole journal,
- or a matched part of it. With a reporting interval, it shows a report
+ The stats command displays summary information for the whole journal,
+ or a matched part of it. With a reporting interval, it shows a report
for each report period.
Example:
@@ -2517,14 +2562,14 @@ COMMANDS
Commodities : 1 ($)
Market prices : 12 ($)
- This command also supports output destination and output format selec-
+ This command also supports output destination and output format selec-
tion.
tags
tags
- List all the tag names used in the journal. With a TAGREGEX argument,
- only tag names matching the regular expression (case insensitive) are
- shown. With QUERY arguments, only transactions matching the query are
+ List all the tag names used in the journal. With a TAGREGEX argument,
+ only tag names matching the regular expression (case insensitive) are
+ shown. With QUERY arguments, only transactions matching the query are
considered. With --values flag, the tags' unique values are listed in-
stead.
@@ -2532,46 +2577,46 @@ COMMANDS
test
Run built-in unit tests.
- This command runs the unit tests built in to hledger-lib and hledger,
+ This command runs the unit tests built in to hledger-lib and hledger,
printing test names and results on stdout. If any test fails, the exit
code will be non-zero.
- Test names include a group prefix. If a (exact, case sensitive) group
- prefix, or a full test name is provided as the first argument, only
+ Test names include a group prefix. If a (exact, case sensitive) group
+ prefix, or a full test name is provided as the first argument, only
that group or test is run.
- If a numeric second argument is provided, it will set the randomness
- seed, for repeatable results from tests using randomness (currently
+ If a numeric second argument is provided, it will set the randomness
+ seed, for repeatable results from tests using randomness (currently
none of them).
- This is mainly used by developers, but it's nice to be able to sanity-
+ This is mainly used by developers, but it's nice to be able to sanity-
check your installed hledger executable at any time. All tests are ex-
- pected to pass - if you ever see otherwise, something has gone wrong,
+ pected to pass - if you ever see otherwise, something has gone wrong,
please report a bug!
ADD-ON COMMANDS
- hledger also searches for external add-on commands, and will include
+ hledger also searches for external add-on commands, and will include
these in the commands list. These are programs or scripts in your PATH
- whose name starts with hledger- and ends with a recognised file exten-
+ whose name starts with hledger- and ends with a recognised file exten-
sion (currently: no extension, bat,com,exe, hs,lhs,pl,py,rb,rkt,sh).
- Add-ons can be invoked like any hledger command, but there are a few
+ Add-ons can be invoked like any hledger command, but there are a few
things to be aware of. Eg if the hledger-web add-on is installed,
- o hledger -h web shows hledger's help, while hledger web -h shows
+ o hledger -h web shows hledger's help, while hledger web -h shows
hledger-web's help.
- o Flags specific to the add-on must have a preceding -- to hide them
- from hledger. So hledger web --serve --port 9000 will be rejected;
+ o Flags specific to the add-on must have a preceding -- to hide them
+ from hledger. So hledger web --serve --port 9000 will be rejected;
you must use hledger web -- --serve --port 9000.
o You can always run add-ons directly if preferred: hledger-web --serve
--port 9000.
- Add-ons are a relatively easy way to add local features or experiment
- with new ideas. They can be written in any language, but haskell
- scripts have a big advantage: they can use the same hledger (and
- haskell) library functions that built-in commands do, for command-line
+ Add-ons are a relatively easy way to add local features or experiment
+ with new ideas. They can be written in any language, but haskell
+ scripts have a big advantage: they can use the same hledger (and
+ haskell) library functions that built-in commands do, for command-line
options, journal parsing, reporting, etc.
Here are some hledger add-ons available:
@@ -2589,7 +2634,7 @@ ADD-ON COMMANDS
hledger-web provides a simple web interface.
Third party add-ons
- These are maintained separately, and usually updated shortly after a
+ These are maintained separately, and usually updated shortly after a
hledger release.
diff
@@ -2597,7 +2642,7 @@ ADD-ON COMMANDS
journal file and another.
iadd
- hledger-iadd is a curses-style, more interactive replacement for the
+ hledger-iadd is a curses-style, more interactive replacement for the
add command.
interest
@@ -2609,15 +2654,15 @@ ADD-ON COMMANDS
count, but it's superseded now by the built-in roi command.
Experimental add-ons
- These are available in source form in the hledger repo's bin/ direc-
+ These are available in source form in the hledger repo's bin/ direc-
tory; installing them is pretty easy. They may be less mature and doc-
- umented than built-in commands. Reading and tweaking these is a good
+ umented than built-in commands. Reading and tweaking these is a good
way to start making your own!
autosync
hledger-autosync is a symbolic link for easily running ledger-autosync,
- if installed. ledger-autosync does deduplicating conversion of OFX
- data and some CSV formats, and can also download the data if your bank
+ if installed. ledger-autosync does deduplicating conversion of OFX
+ data and some CSV formats, and can also download the data if your bank
offers OFX Direct Connect.
chart
@@ -2627,21 +2672,21 @@ ADD-ON COMMANDS
hledger-check.hs checks more powerful account balance assertions.
ENVIRONMENT
- COLUMNS The screen width used by the register command. Default: the
+ COLUMNS The screen width used by the register command. Default: the
full terminal width.
LEDGER_FILE The journal file path when not specified with -f. Default:
- ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
+ ~/.hledger.journal (on windows, perhaps C:/Users/USER/.hledger.jour-
nal).
FILES
- Reads data from one or more files in hledger journal, timeclock, time-
- dot, or CSV format specified with -f, or $LEDGER_FILE, or
- $HOME/.hledger.journal (on windows, perhaps
+ Reads data from one or more files in hledger journal, timeclock, time-
+ dot, or CSV format specified with -f, or $LEDGER_FILE, or
+ $HOME/.hledger.journal (on windows, perhaps
C:/Users/USER/.hledger.journal).
LIMITATIONS
- The need to precede addon command options with -- when invoked from
+ The need to precede addon command options with -- when invoked from
hledger is awkward.
When input data contains non-ascii characters, a suitable system locale
@@ -2657,33 +2702,33 @@ LIMITATIONS
In a Cygwin/MSYS/Mintty window, the tab key is not supported in hledger
add.
- Not all of Ledger's journal file syntax is supported. See file format
+ Not all of Ledger's journal file syntax is supported. See file format
differences.
- On large data files, hledger is slower and uses more memory than
+ On large data files, hledger is slower and uses more memory than
Ledger.
TROUBLESHOOTING
- Here are some issues you might encounter when you run hledger (and re-
- member you can also seek help from the IRC channel, mail list or bug
+ Here are some issues you might encounter when you run hledger (and re-
+ member you can also seek help from the IRC channel, mail list or bug
tracker):
Successfully installed, but "No command 'hledger' found"
stack and cabal install binaries into a special directory, which should
- be added to your PATH environment variable. Eg on unix-like systems,
+ be added to your PATH environment variable. Eg on unix-like systems,
that is ~/.local/bin and ~/.cabal/bin respectively.
I set a custom LEDGER_FILE, but hledger is still using the default file
- LEDGER_FILE should be a real environment variable, not just a shell
- variable. The command env | grep LEDGER_FILE should show it. You may
+ LEDGER_FILE should be a real environment variable, not just a shell
+ variable. The command env | grep LEDGER_FILE should show it. You may
need to use export. Here's an explanation.
- "Illegal byte sequence" or "Invalid or incomplete multibyte or wide
+ "Illegal byte sequence" or "Invalid or incomplete multibyte or wide
character" errors
In order to handle non-ascii letters and symbols (like ), hledger needs
an appropriate locale. This is usually configured system-wide; you can
also configure it temporarily. The locale may need to be one that sup-
- ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always,
+ ports UTF-8, if you built hledger with GHC < 7.2 (or possibly always,
I'm not sure yet).
Here's an example of setting the locale temporarily, on ubuntu
@@ -2702,7 +2747,7 @@ TROUBLESHOOTING
$ echo "export LANG=en_US.UTF-8" >>~/.bash_profile
$ bash --login
- If we preferred to use eg fr_FR.utf8, we might have to install that
+ If we preferred to use eg fr_FR.utf8, we might have to install that
first:
$ apt-get install language-pack-fr
@@ -2723,7 +2768,7 @@ TROUBLESHOOTING
REPORTING BUGS
- Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
+ Report bugs at http://bugs.hledger.org (or on the #hledger IRC channel
or hledger mail list)
@@ -2737,7 +2782,7 @@ COPYRIGHT
SEE ALSO
- hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
+ hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1),
hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_time-
dot(5), ledger(1)
@@ -2745,4 +2790,4 @@ SEE ALSO
-hledger 1.15 August 2019 hledger(1)
+hledger 1.15.2 September 2019 hledger(1)