hledger/hledger-lib/Hledger
gesh a24c39f13f fix: Use POSIX API to compute tty width (#2332)
On some systems, TERM is set to a value that doesn't have a valid
terminfo entry. Rather than hackily fall back on a value for TERM that
appears to work in most contexts (TERM=dumb) but which isn't guaranteed
anywhere to be valid, use proper POSIX ioctls to get the tty width.

This has the added bonus of also working on Windows.

In fact, we already settled on computing the terminal size in this way
in hledger-lib, so this commit centralizes the choice of the logic
there.

Also added a note for alternative methods and their tradeoffs, in case
this turns out to be fragile on some systems.
2025-02-27 13:41:48 -10:00
..
Data imp:print: --invert now also negates balance assertion/assignment amounts [#2314] 2025-01-29 09:47:29 -10:00
Read feat:csv: add an encoding rule, allowing non-UTF8 CSV to be read [#2319] 2025-02-15 14:48:30 -10:00
Reports feat:csv: add an encoding rule, allowing non-UTF8 CSV to be read [#2319] 2025-02-15 14:48:30 -10:00
Utils fix: Use POSIX API to compute tty width (#2332) 2025-02-27 13:41:48 -10:00
Write dev: refactor Hledger.Write.Html etc, reducing Lucid references 2025-01-25 11:53:51 -10:00
Data.hs lib: add Hledger.Data.Currency, currencySymbolToCode, currencyCodeToSymbol 2024-10-11 14:56:03 -10:00
Query.hs imp: queries: Allow regular expression depth queries 2024-12-03 08:33:21 -10:00
Read.hs feat:csv: add an encoding rule, allowing non-UTF8 CSV to be read [#2319] 2025-02-15 14:48:30 -10:00
Reports.hs cln: tests: Remove test and tests, which are just aliases for testCase 2021-08-30 16:32:19 -10:00
Utils.hs dev: fix warnings with ghc 9.10 / base 4.20 2024-09-30 17:20:13 -10:00