From de822ae81308fa7eb7742f1b3c71d45cc2850ca9 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 1 Nov 2025 10:37:41 -1000 Subject: [PATCH] ;fix:close:doc:customisation: edit [#2492] --- hledger/Hledger/Cli/Commands/Close.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hledger/Hledger/Cli/Commands/Close.md b/hledger/Hledger/Cli/Commands/Close.md index bd0d36d03..a00b19a64 100644 --- a/hledger/Hledger/Cli/Commands/Close.md +++ b/hledger/Hledger/Cli/Commands/Close.md @@ -37,8 +37,15 @@ Flags: (can unbalance transactions) ``` -`close` has six modes, selected by choosing one of the mode flags (`--close` is the default). -They all do much the same operation, but with different defaults, useful in different situations. +`close` has six modes, selected by choosing one of the mode flags: +`--clopen`, `--close` (default), `--open`, `--assert`, `--assign`, or `--retain`. +They are all doing the same kind of operation, but with different defaults for different situations. + +The journal entries generated by `close` will have a `clopen:` tag, which is helpful when you want to exclude them from reports. +If the main journal file name contains a number, the tag's value will be that base file name with the number incremented. +Eg if the journal file is 2025.journal, the tag will be `clopen:2026`. +Or you can set the tag value by providing an argument to the mode flag. +Eg `--close=foo` or `--clopen=2025-main`. ### close --clopen @@ -73,11 +80,6 @@ but not the RX accounts (Revenue, Expense). Assertions will be added indicating and checking the new balances of the closed/opened accounts. -The generated transactions will have a `clopen:` tag. -If the main journal's base file name contains a number (eg a year number), -the tag's value will be that base file name with the number incremented. -Or you can choose the tag value yourself, by using `--clopen=TAGVAL`. - ### close --close This prints just the closing balances transaction of `--clopen`. @@ -130,8 +132,7 @@ In all modes, the following things can be overridden: - the closing/opening dates, with `-e OPENDATE` - the balancing account, with `--close-acct=ACCT` and/or `--open-acct=ACCT` - the transaction descriptions, with `--close-desc=DESC` and `--open-desc=DESC` -- the value of the transaction's `clopen` tag, with an argument for the mode flag.\ - (Eg: `--close=foo` or `--clopen=2025-main`) +- the transactions' `clopen` tag value, with a `TAGVAL` argument for the mode flag (see above). By default, the closing date is yesterday, or the journal's end date, whichever is later; and the opening date is always one day after the closing date.