mod_admin_shell: Allow passing columns as a string for convenience
authorKim Alvefur <zash@zash.se>
Wed, 10 Nov 2021 16:28:54 +0100
changeset 11891 b043e1bb8e8e
parent 11890 b0b258e092da
child 11892 050c515fe9aa
mod_admin_shell: Allow passing columns as a string for convenience
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Wed Nov 10 15:54:27 2021 +0100
+++ b/plugins/mod_admin_shell.lua	Wed Nov 10 16:28:54 2021 +0100
@@ -809,6 +809,7 @@
 };
 
 local function get_colspec(colspec, default)
+	if type(colspec) == "string" then colspec = array(colspec:gmatch("%S+")); end
 	local columns = {};
 	for i, col in pairs(colspec or default) do
 		if type(col) == "string" then