Commit Graph

13246 Commits

Author SHA1 Message Date
Simon Michael
f57cd638da imp:print:beancount output: more robust account/commodity encoding
Unsupported chars are now hex-encoded, not just converted to dashes.
This helps keep account and commodity names unique, especially with
the equity conversion account names generated by --infer-equity when
using currency symbols.
(Those could also be converted to ISO 4217 codes, in theory, but
for now we just hex encode them, which is easier to make robust.)

Also, Beancount commodity symbols are no longer enclosed in
hledger-style double quotes.
2024-11-07 01:28:31 -10:00
Simon Michael
cbdbe0a855 dev: AmountFormat: add displayQuotes property to control enclosing quotes 2024-11-07 01:24:21 -10:00
Simon Michael
4b1b97a6aa ;tools: just: add ghci-echo, ghcitui 2024-11-07 01:24:21 -10:00
Simon Michael
1078c176bf ;doc: pager: link to less FAQ
Signed-off-by: Simon Michael <simon@joyful.com>
2024-11-07 01:24:21 -10:00
Dmitry Astapov
c006959b05 lib: fix division by zero in roi when all assets are sold (fixes #2281) 2024-11-06 17:56:36 -10:00
Henning Thielemann
d176215f03 cli: Commands.Aregister: --header -> --heading 2024-11-06 16:38:38 -10:00
Simon Michael
6adda683dc dev:Journal: cleanup 2024-11-02 18:29:15 -10:00
Simon Michael
660bbbb1f4 dev: update errors/README 2024-11-02 18:11:08 -10:00
Simon Michael
326acbf93b imp: check recentassertions: try to make the error message clearer 2024-11-02 18:10:53 -10:00
Simon Michael
090f001eee imp:commodities: also list commodities mentioned in P directives [#2280] 2024-11-02 16:48:08 -10:00
Simon Michael
a58948c7a8 dev:Journal: cleanup, improve docs 2024-11-02 16:47:24 -10:00
Simon Michael
445e80fd41 dev:clarify: rename jcommodities to jdeclaredcommodities 2024-11-02 15:52:17 -10:00
Simon Michael
80fa7e2db6 dev:clarify: rename jinferredcommodities to jinferredcommoditystyles 2024-11-02 15:52:07 -10:00
Simon Michael
5e0a35b1da fix:journal:P directives: require a space after the symbol [#2280]
This prevents surprising parses, like
`P 2024-10-31 a0 1` parsed as `P 2024-10-31 a 01`.
2024-11-02 15:24:25 -10:00
Simon Michael
d6080c5ff1 imp: check commodities: also check commodities used in P directives [#2280] 2024-11-02 15:03:57 -10:00
Simon Michael
c66e901d8b dev: save the parse positions of PriceDirectives 2024-11-02 15:00:47 -10:00
Simon Michael
4d38c63ec8 dev: move/rename nullsourcepos 2024-11-02 14:59:43 -10:00
Simon Michael
5d2259d942 dev: Hledger.Utils.IO: cleanup 2024-11-02 12:59:44 -10:00
Simon Michael
1dabccfb46 dev: Hledger.Utils.IO: more cleanup 2024-11-02 12:51:53 -10:00
Simon Michael
4351304f06 dev: Hledger.Utils.IO: cleanup 2024-11-02 12:04:19 -10:00
Simon Michael
9c81bb2a06 dev: Hledger.Utils.IO colour helpers: cleanup 2024-11-02 11:54:28 -10:00
Simon Michael
75ff6c8218 ;cabal: update cabal files 2024-11-02 08:42:10 -10:00
Simon Michael
657fc1551f !fix: respect --color=yes in a few places that didn't; drop text-ansi dep
Hledger.Utils.IO's ansi style/color helpers now respect --color=yes,
so that eg `hledger --color=yes | less -R` shows bold headings as
you'd expect.

Hledger.Utils.IO.rgb' now takes Float arguments instead of Word8.
2024-11-01 10:40:25 -10:00
Simon Michael
66953ae0be ;doc: pager: note that help -p TOPIC uses less 2024-11-01 08:15:09 -10:00
Simon Michael
234b4879c2 imp: less pager will use HLEDGER_LESS instead, if defined
When using `less` as pager, if HLEDGER_LESS is defined, it will
provide the options (instead of LESS + hledger's extra options).
You can set your own preferred options here, or you can set it
equal to LESS to use exactly those options.

[#2272]-related
2024-11-01 08:02:03 -10:00
Simon Michael
5bab9600e4 imp: simplify pager setup: just customise LESS, not MORE
[#2272]-related
2024-11-01 08:01:44 -10:00
Simon Michael
1011029356 imp: pager set extra LESS options for a nice experience when using less
Currently this sets a rather ambitious set of options,
and overrides the existing LESS:

  --chop-long-lines
  --hilite-unread
  --ignore-case
  --mouse
  --no-init
  --QUIT-AT-EOF
  --quit-if-one-screen
  --RAW-CONTROL-CHARS
  --squeeze-blank-lines
  --use-backslash
  --use-color
2024-10-31 19:13:39 -10:00
Simon Michael
30086ae249 imp: run pager more robustly; drop pager lib [#2272]
This fixes the error displayed when quitting the pager with long output.
It also replaces the pager lib with more robust homegrown pager utilities,
which should prevent a number of failure modes.
2024-10-31 18:55:09 -10:00
Simon Michael
659e493b30 ;doc: update changelogs 2024-10-30 19:01:49 -10:00
Simon Michael
a9a4fd2906 ;tools: push: github remote was renamed to origin (for jj) 2024-10-24 11:10:25 -10:00
Simon Michael
50bf401ea6 dev: split debug/ghcdebug flags, comment out the latter for now
Compilation with ghc-debug is failing, and it has not yet been used
for anything. Separate the flag and leave it in place but commented for now.
2024-10-24 10:44:28 -10:00
Simon Michael
4b4cc54a6a dev:ui: cleanup 2024-10-24 10:44:28 -10:00
Simon Michael
7c31ddfba2 ;tools: note gtree issue 2024-10-24 10:44:28 -10:00
Simon Michael
f96df24a00 ;doc: regular expressions: note possible RTL/bidi limitation 2024-10-24 10:44:28 -10:00
Simon Michael
717e86ff28 ;examples:csv: a YNAB 4 example, with workaround for RTL currency symbol 2024-10-24 10:44:28 -10:00
Simon Michael
de9095792e ;stack: 9.0-9.8: add base-compat-0.14, needed since 1c45496 2024-09-30
I think base-compat-batteries is unnecessary.
I have not tested all these build plans.
2024-10-24 10:44:28 -10:00
Simon Michael
31469ba6cc ;stack: base-compat-batteries seems not needed 2024-10-24 10:44:28 -10:00
Simon Michael
835b8fd0e8 ;ci: ci, oldest: cache ids aren't correctly including ghc version 2024-10-24 10:44:28 -10:00
Henning Thielemann
e43168533f cli: Commands.Aregister: replace option --no-header by --header=YN 2024-10-23 21:55:24 -10:00
Henning Thielemann
1a9bfcf5be cli: Commands.Aregister: implement --invert option 2024-10-23 21:55:24 -10:00
Henning Thielemann
fa3676df7d doc: Commands.Aregister: motivate --no-header option 2024-10-22 12:05:42 -10:00
Henning Thielemann
93d32a934b doc: Commands.Aregister: mention --cumulative option 2024-10-22 12:05:42 -10:00
Henning Thielemann
8a56c4944c cli: Commands.Aregister: new option --no-header 2024-10-22 12:05:42 -10:00
Henning Thielemann
3714ac0593 lib: Write.Ods.printFods: change type of number of fixed rows/columns from (Maybe Int) to Int
0 is a perfect value for no fixed row or column.
2024-10-22 12:05:42 -10:00
Henning Thielemann
b2aad52168 cli: Commands.Aregister: support option --cumulative 2024-10-22 12:05:42 -10:00
Simon Michael
95ef5fad9a ;doc: update manuals 2024-10-20 09:26:32 -10:00
Simon Michael
0f7242182e ;doc: update help 2024-10-20 09:26:08 -10:00
Simon Michael
fc9b6dffbd ;doc: add latest color/pager flags to general options m4 macro 2024-10-20 09:25:02 -10:00
Simon Michael
d985e89bad imp: default V accounts become just E when a new V account is declared
The equity:conversion account, and its variations equity:trade(s) and equity:trading,
normally detected as V/Conversion type, now become ordinary E/Equity accounts
if some other account is declared as V/Conversion type.

This is motivated by the next commit, in which `check accounts` will
stop warning about conversion accounts and their subaccounts,
which means all of the above names and their subaccounts would remain
always exempt from strict account checking.

Now, if the user declares their own conversion account, those default
accounts will become controllable by account checking again.
Which at least reduces the allowlist a bit.

Hopefully this won't cause hassles.
2024-10-20 09:13:58 -10:00
Simon Michael
da11d74ae6 dev: refactor: clarify journalAccountTypes 2024-10-20 09:13:58 -10:00