Commit Graph

12282 Commits

Author SHA1 Message Date
Simon Michael
04bbcc076d ;tools: bench.sh: simplify default benchmarks 2024-01-24 21:59:58 -10:00
Simon Michael
492dfb0cdc ;just: bench: improve 2024-01-24 21:55:08 -10:00
Simon Michael
08dc13aca0 ;just: get-binaries 2024-01-24 21:49:27 -10:00
Simon Michael
94c9317670 ;examples:multi-year:readme: clarify/warn about print --equity losing directives 2024-01-23 23:52:52 -10:00
Simon Michael
508ccfc7d2 imp: balance assertions error: show costs detail with --debug=2 2024-01-23 22:18:34 -10:00
Simon Michael
54c60b4de9 imp: balance assertions error: clarify wording 2024-01-23 22:18:34 -10:00
Simon Michael
e694e7869d fix: check mixed-cost balances correctly again; cleanup (#2150)
The code is a bit clearer, and it no longer discards amounts other
than the first when the running balance contains multiple costs.
(This bug was exposed by the fix for #2039).
2024-01-23 21:35:07 -10:00
Simon Michael
8ec46baec9 dev: clarify behaviour of filterMixedAmountByCommodity, showMixedAmount* 2024-01-23 21:35:06 -10:00
Simon Michael
df79aa5e35 dev: distinguish oneLineFmt and oneLineNoCostFmt; add fullZeroFmt 2024-01-23 21:35:06 -10:00
Simon Michael
999cba8c31 dev: cleanup; add showAmountWith, showMixedAmountWith 2024-01-23 21:35:06 -10:00
Simon Michael
0cb382cf0e dev: rename AmountDisplayOpts -> AmountFormat, and related constants
noColour          -> defaultFmt
noCost            -> noCostFmt
oneLine           -> oneLineFmt
csvDisplay        -> machineFmt
2024-01-23 21:35:06 -10:00
Simon Michael
e2ed2b3b6d dev: clarify showAmountsCostB 2024-01-23 21:35:06 -10:00
Simon Michael
ca55c2f0f8 dev: rename other Price helpers to Cost
showAmountWithoutPrice             -> showAmountWithoutCost
mixedAmountStripPrices             -> mixedAmountStripCosts
showMixedAmountWithoutPrice        -> showMixedAmountWithoutCost
showMixedAmountOneLineWithoutPrice -> showMixedAmountOneLineWithoutCost
2024-01-23 21:35:06 -10:00
Simon Michael
323f87b3e9 dev: Amount: aprice -> acost
Acked-by: Simon Michael <simon@joyful.com>
2024-01-23 21:35:06 -10:00
Simon Michael
8102bd9c2b dev: AmountPrice,UnitPrice,TotalPrice -> AmountCost,UnitCost,TotalCost; related renames 2024-01-23 21:35:06 -10:00
Simon Michael
e201775e93 dev: amountStripPrices -> amountStripCost 2024-01-23 21:35:06 -10:00
Simon Michael
0353840d90 dev: showAmountPrice -> showAmountCostB, showAmountPriceDebug -> showAmountCostDebug 2024-01-23 21:35:06 -10:00
Colin Dean
2ac0905c70 dev: Runs shellcheck on hledger-simplebal
Shellcheck handled the variable fixups. The pipefail flag avoids another
Shellcheck warning w.r.t. handling pipe failures. This script is so
minimal that it's safe to simply fail the pipe entirely if the hledger
command fails.
2024-01-23 06:30:32 -10:00
Colin Dean
4faa381ccd fix: Run shellcheck on hledger-bar
I [encountered][1] an unexpected error when testing hledger-bar for
proposed inclusion in Homebrew's default installation of hledger:

    /opt/homebrew/Cellar/hledger/1.32.2_1/bin/hledger-bar: line 81:
    conditional binary operator expected

I'm doubt that this is fixed by running shellcheck, but checking
a script against shellcheck is usually one of the first things I check
before debugging shell!

This patch is ~generated by shellcheck with

    shellcheck --shell=bash --enable=all --format=diff bin/hledger-bar | \
    git apply

plus some extra, manual additions in the form of a shellcheck directive
to accept something that's a little abnormal for shellcheck but fine
here. The `set -o inherit_exit` was also recommended by shellcheck.

[1]: https://github.com/Homebrew/homebrew-core/actions/runs/7606843601/job/20713321881?pr=160590
2024-01-22 18:16:47 -10:00
Simon Michael
bd8bd393f2 ;fix:hledger-bar: really fix the error when NO_COLOR is not defined [#2159]
Also, it's now more compliant with the no-color.org spec:

  Command-line software which adds ANSI color to its output by default
  should check for a NO_COLOR environment variable that, when present
  and not an empty string (regardless of its value), prevents the
  addition of ANSI color.

so one can now temporarily override $NO_COLOR=1 in the environment by
setting it empty: NO_COLOR= hledger ...
2024-01-22 12:40:48 -10:00
Simon Michael
0f30316cfd ;bin:hledger-bar: fix an error when NO_COLOR is not defined [#2159] 2024-01-22 11:28:13 -10:00
Simon Michael
d8addd5926 ;bin:hledger-bar: fix a shellcheck warning 2024-01-22 10:29:47 -10:00
Simon Michael
ac47ea4a0e imp:balance assertion error message: make it clearer, show diff again 2024-01-21 15:02:51 -10:00
Simon Michael
6091f583dc fix: import: --catchup works again [#2156] 2024-01-21 12:33:15 -10:00
Simon Michael
41711d8ab5 fix:--anon: now hidden, gives an error, still usable as --obfuscate [#2133] 2024-01-21 11:59:11 -10:00
Simon Michael
0cdc012fd9 dev:journalTransform: cleanup 2024-01-21 10:25:55 -10:00
Simon Michael
f3073990cc imp:close: infer a default tag value by incrementing current file name [#2151] 2024-01-21 02:30:33 -10:00
Simon Michael
c2ce1c2037 imp:close: add tags, with optional custom value, for easier matching/exclusion [#2151]
They are `balances:` for assertion transactions,
`retain:` for retained earnings transactions,
and `start` for opening/closing transactions.

And some --help cleanups.
2024-01-21 01:44:14 -10:00
Simon Michael
29ac554765 ;doc:tags: discuss tag names, list reserved ones 2024-01-21 01:25:54 -10:00
Simon Michael
298a9c29b4 ;dev: Query comments 2024-01-21 00:57:30 -10:00
Simon Michael
f53f3a0194 dev:close: refactor 2024-01-20 21:53:46 -10:00
Simon Michael
38d9f1760e ;examples:multi-year: edits 2024-01-20 16:48:58 -10:00
Simon Michael
b418e686c9 ;examples:multi-year: edits 2024-01-20 16:36:52 -10:00
Simon Michael
15b4f9e8d2 ;doc:close: layout 2024-01-20 16:18:25 -10:00
Simon Michael
4b1410c4b5 ;doc:close: fix link 2024-01-20 16:14:35 -10:00
Simon Michael
5d073e16e3 ;doc:close: edits 2024-01-20 16:07:00 -10:00
Simon Michael
6b5b467cce doc:close: edits 2024-01-20 15:43:46 -10:00
Simon Michael
682609c501 ;examples:README: update 2024-01-20 15:42:38 -10:00
Simon Michael
4ccb5ad9f6 ;examples:multi-year: expand, show equity & accounting equation [#2151] 2024-01-20 15:42:38 -10:00
Simon Michael
e61c9bad10 ;examples:multi-year: how to show year-end balances in closed files [#2151] 2024-01-20 15:42:38 -10:00
Simon Michael
785206ee94 ;doc:close: rewrite again; and give a better excluding technique [#2151] 2024-01-20 15:42:38 -10:00
Simon Michael
cd72c62858 imp:close: exclude E by default; and always exclude the balancing account [#2151]
The first of some changes discussed on the issue. A more useful default ?
2024-01-20 15:42:38 -10:00
Simon Michael
582d6dbdd7 ;doc:CREDITS: committer avatars 2024-01-19 15:59:58 -10:00
Simon Michael
28d30ae8a1 ;doc:ISSUES: fix links 2024-01-18 20:18:01 -10:00
Simon Michael
e92575d9e6 ;doc:ISSUES: update regressions label 2024-01-18 19:43:17 -10:00
Simon Michael
0a5650f13d ;doc:REGRESSIONS: update, list all regressions since 1.19 2024-01-18 19:35:30 -10:00
Simon Michael
cc254dda26 ;doc:ISSUES: cleanup 2024-01-18 13:03:07 -10:00
Simon Michael
2182560ab4 ;doc:ISSUES: cleanup 2024-01-18 12:48:24 -10:00
Simon Michael
6f30cea2fc ;doc:ISSUES: update open issues table 2024-01-18 12:44:48 -10:00
Simon Michael
fa66d18e40 ;doc:ISSUES: fix links 2024-01-18 12:44:39 -10:00