From 41be222478be271c0450e37c1060914b266bc24d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 7 Apr 2023 13:00:58 +0200 Subject: util.human.io: Allow defining per column ellipsis function As an alternative to doing it in the mapper function. Could be useful in cases where one may want to put the ellipsis in the middle or beginning instead of the start. --- util/human/io.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/human/io.lua b/util/human/io.lua index 22c2c3ba..b2318c0f 100644 --- a/util/human/io.lua +++ b/util/human/io.lua @@ -176,7 +176,7 @@ local function new_table(col_specs, max_width) v = padright(v, width); end elseif len(v) > width then - v = ellipsis(v, width); + v = (column.ellipsis or ellipsis)(v, width); end table.insert(output, v); end -- cgit v1.2.3