util/human/io.lua
changeset 10898 d15a4284fdf8
parent 10897 a256044c1d12
child 10900 c7a0eab27165
--- a/util/human/io.lua	Wed Jun 03 22:45:33 2020 +0100
+++ b/util/human/io.lua	Wed Jun 03 22:58:29 2020 +0100
@@ -1,3 +1,5 @@
+local array = require "util.array";
+
 local function getchar(n)
 	local stty_ret = os.execute("stty raw -echo 2>/dev/null");
 	local ok, char;
@@ -119,6 +121,9 @@
 	end
 
 	return function (row)
+		if not row then
+			row = array.pluck(col_specs, "title");
+		end
 		local output = {};
 		for i, column in ipairs(col_specs) do
 			local width = widths[i];