;close: doc: cleanups, remove dangerous >> example (#1165)

[ci skip]
This commit is contained in:
Simon Michael 2020-01-22 15:31:33 -08:00
parent 81b92be803
commit f1f32e8341
5 changed files with 111 additions and 119 deletions

View File

@ -24,8 +24,8 @@ postings they balance, which makes troubleshooting easier.
By default, transaction prices in the journal are ignored when By default, transaction prices in the journal are ignored when
generating the closing/opening transactions. generating the closing/opening transactions.
With `--show-costs`, this cost information is preserved, With `--show-costs`, this cost information is preserved
so that `balance -B` reports will be unchanged after the transition. (`balance -B` reports will be unchanged after the transition).
Separate postings are generated for each cost in each commodity. Separate postings are generated for each cost in each commodity.
Note this can generate very large journal entries, if you have many Note this can generate very large journal entries, if you have many
foreign currency or investment transactions. foreign currency or investment transactions.
@ -64,13 +64,13 @@ will probably always require --auto.
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from command line: Carrying asset/liability balances into a new file for 2019:
*Warning: we use `>>` here to append; be careful not to type a single `>` which would wipe your journal!*
```shell ```shell
$ hledger close -f 2018.journal -e 2019 assets liabilities --open >>2019.journal $ hledger close -f 2018.journal -e 2019 assets liabilities --open
$ hledger close -f 2018.journal -e 2019 assets liabilities --close >>2018.journal # (copy/paste the output to the start of your 2019 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close
# (copy/paste the output to the end of your 2018 journal file)
``` ```
Now: Now:

View File

@ -25,10 +25,10 @@ they balance, which makes troubleshooting easier.
By default, transaction prices in the journal are ignored when By default, transaction prices in the journal are ignored when
generating the closing/opening transactions. With --show-costs, this generating the closing/opening transactions. With --show-costs, this
cost information is preserved, so that balance -B reports will be cost information is preserved (balance -B reports will be unchanged
unchanged after the transition. Separate postings are generated for each after the transition). Separate postings are generated for each cost in
cost in each commodity. Note this can generate very large journal each commodity. Note this can generate very large journal entries, if
entries, if you have many foreign currency or investment transactions. you have many foreign currency or investment transactions.
close usage close usage
@ -63,14 +63,12 @@ command with --auto, the balance assertions will probably always require
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019:
command line:
Warning: we use >> here to append; be careful not to type a single > $ hledger close -f 2018.journal -e 2019 assets liabilities --open
which would wipe your journal! # (copy/paste the output to the start of your 2019 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close
$ hledger close -f 2018.journal -e 2019 assets liabilities --open >>2019.journal # (copy/paste the output to the end of your 2018 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close >>2018.journal
Now: Now:

View File

@ -2735,8 +2735,8 @@ postings they balance, which makes troubleshooting easier.
.PP .PP
By default, transaction prices in the journal are ignored when By default, transaction prices in the journal are ignored when
generating the closing/opening transactions. generating the closing/opening transactions.
With \f[C]--show-costs\f[R], this cost information is preserved, so that With \f[C]--show-costs\f[R], this cost information is preserved
\f[C]balance -B\f[R] reports will be unchanged after the transition. (\f[C]balance -B\f[R] reports will be unchanged after the transition).
Separate postings are generated for each cost in each commodity. Separate postings are generated for each cost in each commodity.
Note this can generate very large journal entries, if you have many Note this can generate very large journal entries, if you have many
foreign currency or investment transactions. foreign currency or investment transactions.
@ -2780,16 +2780,14 @@ will probably always require --auto.
.PP .PP
Examples: Examples:
.PP .PP
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019:
command line:
.PP
\f[I]Warning: we use \f[CI]>>\f[I] here to append; be careful not to
type a single \f[CI]>\f[I] which would wipe your journal!\f[R]
.IP .IP
.nf .nf
\f[C] \f[C]
$ hledger close -f 2018.journal -e 2019 assets liabilities --open >>2019.journal $ hledger close -f 2018.journal -e 2019 assets liabilities --open
$ hledger close -f 2018.journal -e 2019 assets liabilities --close >>2018.journal # (copy/paste the output to the start of your 2019 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close
# (copy/paste the output to the end of your 2018 journal file)
\f[R] \f[R]
.fi .fi
.PP .PP

View File

@ -2231,10 +2231,10 @@ postings they balance, which makes troubleshooting easier.
By default, transaction prices in the journal are ignored when By default, transaction prices in the journal are ignored when
generating the closing/opening transactions. With '--show-costs', this generating the closing/opening transactions. With '--show-costs', this
cost information is preserved, so that 'balance -B' reports will be cost information is preserved ('balance -B' reports will be unchanged
unchanged after the transition. Separate postings are generated for after the transition). Separate postings are generated for each cost in
each cost in each commodity. Note this can generate very large journal each commodity. Note this can generate very large journal entries, if
entries, if you have many foreign currency or investment transactions. you have many foreign currency or investment transactions.
* Menu: * Menu:
@ -2279,14 +2279,12 @@ require -auto.
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019:
command line:
_Warning: we use '>>' here to append; be careful not to type a single $ hledger close -f 2018.journal -e 2019 assets liabilities --open
'>' which would wipe your journal!_ # (copy/paste the output to the start of your 2019 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close
$ hledger close -f 2018.journal -e 2019 assets liabilities --open >>2019.journal # (copy/paste the output to the end of your 2018 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close >>2018.journal
Now: Now:
@ -3319,76 +3317,76 @@ Node: check-dupes76317
Ref: #check-dupes76441 Ref: #check-dupes76441
Node: close76734 Node: close76734
Ref: #close76848 Ref: #close76848
Node: close usage78377 Node: close usage78370
Ref: #close-usage78470 Ref: #close-usage78463
Node: commodities81310 Node: commodities81276
Ref: #commodities81437 Ref: #commodities81403
Node: descriptions81519 Node: descriptions81485
Ref: #descriptions81647 Ref: #descriptions81613
Node: diff81828 Node: diff81794
Ref: #diff81934 Ref: #diff81900
Node: files82981 Node: files82947
Ref: #files83081 Ref: #files83047
Node: help83228 Node: help83194
Ref: #help83328 Ref: #help83294
Node: import84409 Node: import84375
Ref: #import84523 Ref: #import84489
Node: Importing balance assignments85416 Node: Importing balance assignments85382
Ref: #importing-balance-assignments85564 Ref: #importing-balance-assignments85530
Node: incomestatement86213 Node: incomestatement86179
Ref: #incomestatement86346 Ref: #incomestatement86312
Node: notes87750 Node: notes87716
Ref: #notes87863 Ref: #notes87829
Node: payees87989 Node: payees87955
Ref: #payees88095 Ref: #payees88061
Node: prices88253 Node: prices88219
Ref: #prices88359 Ref: #prices88325
Node: print88700 Node: print88666
Ref: #print88810 Ref: #print88776
Node: print-unique93454 Node: print-unique93420
Ref: #print-unique93580 Ref: #print-unique93546
Node: register93865 Node: register93831
Ref: #register93992 Ref: #register93958
Node: Custom register output98164 Node: Custom register output98130
Ref: #custom-register-output98293 Ref: #custom-register-output98259
Node: register-match99555 Node: register-match99521
Ref: #register-match99689 Ref: #register-match99655
Node: rewrite100040 Node: rewrite100006
Ref: #rewrite100155 Ref: #rewrite100121
Node: Re-write rules in a file102010 Node: Re-write rules in a file101976
Ref: #re-write-rules-in-a-file102144 Ref: #re-write-rules-in-a-file102110
Node: Diff output format103354 Node: Diff output format103320
Ref: #diff-output-format103523 Ref: #diff-output-format103489
Node: rewrite vs print --auto104615 Node: rewrite vs print --auto104581
Ref: #rewrite-vs.-print---auto104794 Ref: #rewrite-vs.-print---auto104760
Node: roi105350 Node: roi105316
Ref: #roi105448 Ref: #roi105414
Node: stats106460 Node: stats106426
Ref: #stats106559 Ref: #stats106525
Node: tags107347 Node: tags107313
Ref: #tags107445 Ref: #tags107411
Node: test107739 Node: test107705
Ref: #test107823 Ref: #test107789
Node: ADD-ON COMMANDS108570 Node: ADD-ON COMMANDS108536
Ref: #add-on-commands108680 Ref: #add-on-commands108646
Node: Official add-ons109968 Node: Official add-ons109934
Ref: #official-add-ons110108 Ref: #official-add-ons110074
Node: ui110188 Node: ui110154
Ref: #ui110275 Ref: #ui110241
Node: web110329 Node: web110295
Ref: #web110418 Ref: #web110384
Node: Third party add-ons110464 Node: Third party add-ons110430
Ref: #third-party-add-ons110639 Ref: #third-party-add-ons110605
Node: iadd110758 Node: iadd110724
Ref: #iadd110859 Ref: #iadd110825
Node: interest110941 Node: interest110907
Ref: #interest111050 Ref: #interest111016
Node: Experimental add-ons111145 Node: Experimental add-ons111111
Ref: #experimental-add-ons111297 Ref: #experimental-add-ons111263
Node: autosync111535 Node: autosync111501
Ref: #autosync111646 Ref: #autosync111612
Node: chart111885 Node: chart111851
Ref: #chart111990 Ref: #chart111956
 
End Tag Table End Tag Table

View File

@ -1967,10 +1967,10 @@ COMMANDS
By default, transaction prices in the journal are ignored when generat- By default, transaction prices in the journal are ignored when generat-
ing the closing/opening transactions. With --show-costs, this cost in- ing the closing/opening transactions. With --show-costs, this cost in-
formation is preserved, so that balance -B reports will be unchanged formation is preserved (balance -B reports will be unchanged after the
after the transition. Separate postings are generated for each cost in transition). Separate postings are generated for each cost in each
each commodity. Note this can generate very large journal entries, if commodity. Note this can generate very large journal entries, if you
you have many foreign currency or investment transactions. have many foreign currency or investment transactions.
close usage close usage
If you split your journal files by time (eg yearly), you will typically If you split your journal files by time (eg yearly), you will typically
@ -2005,14 +2005,12 @@ COMMANDS
Examples: Examples:
Carrying asset/liability balances into a new file for 2019, all from Carrying asset/liability balances into a new file for 2019:
command line:
Warning: we use >> here to append; be careful not to type a single > $ hledger close -f 2018.journal -e 2019 assets liabilities --open
which would wipe your journal! # (copy/paste the output to the start of your 2019 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close
$ hledger close -f 2018.journal -e 2019 assets liabilities --open >>2019.journal # (copy/paste the output to the end of your 2018 journal file)
$ hledger close -f 2018.journal -e 2019 assets liabilities --close >>2018.journal
Now: Now: