Comparison

plugins/mod_admin_shell.lua @ 13132:5bfcfd12c423

mod_admin_shell: Use new serialize preset to simplify default config Two pairs replaced by one. Blame lua-format for the line diff delta.
author Kim Alvefur <zash@zash.se>
date Fri, 09 Jun 2023 17:38:46 +0200
parent 13128:38582771b593
child 13170:082c7d856e61
comparison
equal deleted inserted replaced
13131:03f1509a6105 13132:5bfcfd12c423
368 368
369 -- Session environment -- 369 -- Session environment --
370 -- Anything in def_env will be accessible within the session as a global variable 370 -- Anything in def_env will be accessible within the session as a global variable
371 371
372 --luacheck: ignore 212/self 372 --luacheck: ignore 212/self
373 local serialize_defaults = module:get_option("console_prettyprint_settings", 373 local serialize_defaults = module:get_option("console_prettyprint_settings", {
374 { fatal = false; unquoted = true; maxdepth = 2; table_iterator = "pairs" }) 374 preset = "pretty";
375 maxdepth = 2;
376 table_iterator = "pairs";
377 })
375 378
376 def_env.output = {}; 379 def_env.output = {};
377 function def_env.output:configure(opts) 380 function def_env.output:configure(opts)
378 if type(opts) ~= "table" then 381 if type(opts) ~= "table" then
379 opts = { preset = opts }; 382 opts = { preset = opts };