From e3736fddde889e7953913313b6630eb3f8c3ea55 Mon Sep 17 00:00:00 2001 From: ooker Date: Fri, 17 Oct 2025 12:31:48 +0700 Subject: [PATCH] ;docs:manual: add info about the -c command line option in the commodity directy section --- hledger/hledger.m4.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 3a1d44695..b3949d5a9 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -920,7 +920,7 @@ $ hledger print -c '$1.000,0' This option can be repeated to set the display style for multiple commodities/currencies. Its argument is as described in -the [commodity directive](#commodity-directive). +the [commodity directive](#commodity-directive). Note that omitting the commodity symbol will set the display style for just the no-symbol commodity, not all commodities. In some cases hledger will adjust number formatting to improve their parseability (such as adding [trailing decimal marks](#trailing-decimal-marks) when needed). @@ -2219,7 +2219,7 @@ Tips: - You can list accounts and their types, for troubleshooting: ```cli - $ hledger accounts --types [ACCTPAT] [type:TYPECODES] [-DEPTH] + $ hledger accounts --types [ACCTPAT] [type:TYPECODES] [-DEPTH] [--locations] ``` - It's a good idea to declare at least one account for each account type. @@ -2480,6 +2480,10 @@ So if you are relying on them (especially 4) and using multiple files, placing your commodity directives in a top-level parent file might be important. Or, keep your decimal marks unambiguous and your entries well balanced and precise. +Omitting the commodity symbol will set the display style for just the no-symbol commodity, not all commodities. + +Commodity styles can be [overridden](#commodity-styles) by the `-c/--commodity-style` command line option. + (Related: [#793](https://github.com/simonmichael/hledger/issues/793)) ### Commodity directive syntax