aboutsummaryrefslogtreecommitdiffstats
path: root/util/human/io.lua
Commit message (Collapse)AuthorAgeFilesLines
* util: Remove various Lua 5.1 compatibility hacksKim Alvefur2022-07-021-4/+1
| | | | Part of #1600
* util.human.io: Use UTF-8-aware length check in padding functionsKim Alvefur2021-11-121-2/+2
|
* util.human.io: Fix cutting of UTF-8 into piecesKim Alvefur2021-11-121-7/+21
| | | | Down the rabbit hole we go...
* util.human.io: Trim any broken UTF-8 from ellipsisKim Alvefur2021-11-121-1/+5
| | | | | | | This should fix basic problems with multi-byte UTF-8 sequences getting cut in the middle. Down the rabbit hole we go...
* util.human.io: Factor out ellipsis functionKim Alvefur2021-11-121-1/+6
| | | | Could be useful elsewhere
* util.human.io: Support specifying column defaults in tablesKim Alvefur2021-11-121-1/+1
|
* util.human.io: Pass nil to cell mapper to signal missing valueKim Alvefur2021-11-121-1/+9
| | | | | Seems more like conventional Lua than passing an empty string to signal lack of value.
* util.human.io: Fix right-alignmentKim Alvefur2020-06-061-1/+1
|
* util.human.io.table: Allow a map callaback per columnKim Alvefur2020-06-041-1/+1
| | | | | | This allows e.g. mapping booleans to "yes" or "no", specific number formatting or generating virtual columns. All while not mutating the underlying data or creating additional temporary tables.
* util.human.io: Consider separator when calculating remaining widthKim Alvefur2020-06-041-0/+3
|
* util.human.io: Use literal ellipsis instead of \u escapeKim Alvefur2020-06-041-1/+1
| | | | For compat with Lua 5.2 and before
* util.human.io: Replace overflow with ellipsisKim Alvefur2020-06-041-1/+3
|
* util.human.io: Draw a separator between columnsKim Alvefur2020-06-041-2/+3
|
* util.human.io: Remove padding option and use $COLUMNS as default widthMatthew Wild2020-06-041-4/+3
|
* util.human.io: table: Fix title printing when columns use named keysMatthew Wild2020-06-041-2/+3
|
* util.human.io: table: Return title row when no row data passedMatthew Wild2020-06-031-0/+5
|
* util.human.io: table: switch row function to simply returning prepared row ↵Matthew Wild2020-06-031-5/+6
| | | | string
* util.human.io: Add padleft, padright and a table printing functionMatthew Wild2020-06-031-0/+53
|
* util.human.io: Fix variable name [luacheck]Matthew Wild2020-06-021-1/+1
|
* util.human.io: New central place for UI helpersMatthew Wild2020-06-021-0/+96