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. |
||
|---|---|---|
| .. | ||
| Hledger | ||
| other/ledger-parse | ||
| test | ||
| Text | ||
| .date.m4 | ||
| .ghci | ||
| .version | ||
| .version.m4 | ||
| CHANGES.md | ||
| hledger-lib.cabal | ||
| Hledger.hs | ||
| LICENSE | ||
| package.yaml | ||
| README.md | ||
| Setup.hs | ||
hledger-lib
A reusable library containing hledger’s core functionality. This is used by most hledger* packages so that they support the same common file formats, command line options, reports etc.
See also: the project README and home page.