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.
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.
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
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
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.
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.