diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-11-15 13:15:34 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-11-15 13:15:34 -0500 |
| commit | e379656333caefe28914c6bc0cdfe9a80b1ecd0e (patch) | |
| tree | dbc8ebef215d90b4d6285530a31dc1bd4ae0f15f /.mbs | |
| parent | a405ec93546b95c2369ec9069b3616944d785198 (diff) | |
| download | bits-UI-e379656333caefe28914c6bc0cdfe9a80b1ecd0e.tar.gz bits-UI-e379656333caefe28914c6bc0cdfe9a80b1ecd0e.tar.bz2 bits-UI-e379656333caefe28914c6bc0cdfe9a80b1ecd0e.zip | |
Updated MBS
Diffstat (limited to '.mbs')
| -rw-r--r-- | .mbs/bin/lua.lua | 39 | ||||
| -rw-r--r-- | .mbs/bin/shell.lua | 38 | ||||
| -rw-r--r-- | .mbs/lib/blit_window.lua | 32 | ||||
| -rw-r--r-- | .mbs/lib/readline.lua | 38 | ||||
| -rw-r--r-- | .mbs/lib/scroll_window.lua | 32 | ||||
| -rw-r--r-- | .mbs/lib/stack_trace.lua | 4 | ||||
| -rw-r--r-- | .mbs/modules/lua.lua | 8 | ||||
| -rw-r--r-- | .mbs/modules/pager.lua | 6 | ||||
| -rw-r--r-- | .mbs/modules/readline.lua | 2 |
9 files changed, 118 insertions, 81 deletions
diff --git a/.mbs/bin/lua.lua b/.mbs/bin/lua.lua index eed7aa9..cdbdbed 100644 --- a/.mbs/bin/lua.lua +++ b/.mbs/bin/lua.lua @@ -263,7 +263,7 @@ local function pretty(t, n) local width, height = term.getSize() local fit_height = settings.get("mbs.lua.pretty_height", true) if type(fit_height) == "number" then height = fit_height - elseif fit_height == false then height = 1/0 end + elseif fit_height == false then height = 1 / 0 end return pretty_impl(t, {}, width, height - 2, "", n) end @@ -272,6 +272,7 @@ local history = {} local counter = 1 local output = {} + local environment = setmetatable({ exit = setmetatable({}, { __tostring = function() return "Call exit() to exit" end, @@ -283,6 +284,42 @@ local environment = setmetatable({ out = output, }, { __index = _ENV }) + +local function process_auto_run_file(folderPath, file) + if string.sub( file, 1, 1 ) == "." then return end + + local path = fs.combine(folderPath, file) + if fs.isDir( path ) then return end + + local func, err = loadfile(path, nil, _ENV) + if not func then + printError(err) + return + end + + local ok, result + if settings.get("mbs.lua.traceback", true) then + ok, result = stack_trace.xpcall_with(func) + else + ok, result = pcall(func) + end + if not ok then + printError(result) + end +end + +local function load_auto_run_folder(folderPath) + if fs.exists( folderPath ) and fs.isDir( folderPath ) then + local files = fs.list( folderPath ) + for _, file in ipairs( files ) do + process_auto_run_file(folderPath, file) + end + end +end + +load_auto_run_folder("/rom/lua_autorun") +load_auto_run_folder("/lua_autorun") + local autocomplete = nil if not settings or settings.get("lua.autocomplete") then autocomplete = function(line) diff --git a/.mbs/bin/shell.lua b/.mbs/bin/shell.lua index 6dd7d9c..2fbb53a 100644 --- a/.mbs/bin/shell.lua +++ b/.mbs/bin/shell.lua @@ -7,10 +7,10 @@ if multishell then end local bExit = false -local sDir = (parentShell and parentShell.dir()) or "" -local sPath = (parentShell and parentShell.path()) or ".:/rom/programs" -local tAliases = (parentShell and parentShell.aliases()) or {} -local tCompletionInfo = (parentShell and parentShell.getCompletionInfo()) or {} +local sDir = parentShell and parentShell.dir() or "" +local sPath = parentShell and parentShell.path() or ".:/rom/programs" +local tAliases = parentShell and parentShell.aliases() or {} +local tCompletionInfo = parentShell and parentShell.getCompletionInfo() or {} local tProgramStack = {} local history = parentShell and type(parentShell.history) == "function" and parentShell.history() local fWrapper = nil @@ -36,12 +36,11 @@ local function createShellEnv(sDir) string = string, table = table, } - package.path = settings.get('mbs.shell.require_path') or - "?;?.lua;?/init.lua;/rom/modules/main/?;/rom/modules/main/?.lua;/rom/modules/main/?/init.lua" + package.path = settings.get('mbs.shell.require_path', "?;?.lua;?/init.lua;/rom/modules/main/?;/rom/modules/main/?.lua;/rom/modules/main/?/init.lua") if turtle then - package.path = package.path..";/rom/modules/turtle/?;/rom/modules/turtle/?.lua;/rom/modules/turtle/?/init.lua" + package.path = package.path .. ";/rom/modules/turtle/?;/rom/modules/turtle/?.lua;/rom/modules/turtle/?/init.lua" elseif command then - package.path = package.path..";/rom/modules/command/?;/rom/modules/command/?.lua;/rom/modules/command/?/init.lua" + package.path = package.path .. ";/rom/modules/command/?;/rom/modules/command/?.lua;/rom/modules/command/?/init.lua" end package.config = "/\n;\n?\n!\n-" package.preload = {} @@ -58,7 +57,7 @@ local function createShellEnv(sDir) local sError = "" for pattern in string.gmatch(package.path, "[^;]+") do local sPath = string.gsub(pattern, "%?", fname) - if sPath:sub(1,1) ~= "/" then + if sPath:sub(1, 1) ~= "/" then sPath = fs.combine(sDir, sPath) end if fs.exists(sPath) and not fs.isDir(sPath) then @@ -76,7 +75,7 @@ local function createShellEnv(sDir) end end return nil, sError - end + end, } local sentinel = {} @@ -133,7 +132,7 @@ local function run(_sCommand, ...) if multishell then local sTitle = fs.getName(sPath) if sTitle:sub(-4) == ".lua" then - sTitle = sTitle:sub(1,-5) + sTitle = sTitle:sub(1, -5) end multishell.setTitle(multishell.getCurrent(), sTitle) end @@ -173,7 +172,7 @@ local function run(_sCommand, ...) if #tProgramStack > 0 then local sTitle = fs.getName(tProgramStack[#tProgramStack]) if sTitle:sub(-4) == ".lua" then - sTitle = sTitle:sub(1,-5) + sTitle = sTitle:sub(1, -5) end multishell.setTitle(multishell.getCurrent(), sTitle) else @@ -275,7 +274,6 @@ function shell.resolveProgram(_sCommand) end -- If the path is a global path, use it directly - local sStartChar = string.sub(_sCommand, 1, 1) if _sCommand:find("/") or _sCommand:find("\\") then local sPath = shell.resolve(_sCommand) if fs.exists(sPath) and not fs.isDir(sPath) then @@ -314,12 +312,12 @@ function shell.programs(_bIncludeHidden) sPath = shell.resolve(sPath) if fs.isDir(sPath) then local tList = fs.list(sPath) - for n=1,#tList do + for n = 1, #tList do local sFile = tList[n] if not fs.isDir(fs.combine(sPath, sFile)) and (_bIncludeHidden or string.sub(sFile, 1, 1) ~= ".") then if #sFile > 4 and sFile:sub(-4) == ".lua" then - sFile = sFile:sub(1,-5) + sFile = sFile:sub(1, -5) end tItems[sFile] = true end @@ -368,7 +366,7 @@ local function completeProgram(sLine) -- Add programs from the path local tPrograms = shell.programs() - for n=1,#tPrograms do + for n = 1, #tPrograms do local sProgram = tPrograms[n] if #sProgram > #sLine and string.sub(sProgram, 1, #sLine) == sLine then local sResult = string.sub(sProgram, #sLine + 1) @@ -410,7 +408,7 @@ function shell.complete(sLine) return { " " } else local tResults = completeProgram(sBit) - for n=1,#tResults do + for n = 1, #tResults do local sResult = tResults[n] local sPath = shell.resolveProgram(sBit .. sResult) if tCompletionInfo[sPath] then @@ -447,7 +445,7 @@ function shell.setCompletionFunction(sProgram, fnComplete) error("bad argument #2 (expected function, got " .. type(fnComplete) .. ")", 2) end tCompletionInfo[sProgram] = { - fnComplete = fnComplete + fnComplete = fnComplete, } end @@ -542,7 +540,9 @@ local parent = term.current() local redirect = scroll_window.create(parent) local function get_first_startup() - if fs.exists("startup.lua") then return "startup.lua" end + if fs.exists("startup.lua") and not fs.isDir("startup.lua") then + return "startup.lua" + end if fs.isDir("startup") then local first = fs.list("startup")[1] if first then return fs.combine("startup", first) end diff --git a/.mbs/lib/blit_window.lua b/.mbs/lib/blit_window.lua index 39cd843..9cd4979 100644 --- a/.mbs/lib/blit_window.lua +++ b/.mbs/lib/blit_window.lua @@ -58,14 +58,14 @@ function create(original) local lineBack = back_colour[cursor_y] local preStop = pos - 1 local preStart = math.min(1, preStop) - local postStart = pos + string.len(writeText) + local postStart = pos + #writeText local postStop = sizeX local sub, rep = string.sub, string.rep - text[cursor_y] = sub(lineText, preStart, preStop)..writeText..sub(lineText, postStart, postStop) - text_colour[cursor_y] = sub(lineColor, preStart, preStop)..rep(cur_text_colour, #writeText)..sub(lineColor, postStart, postStop) - back_colour[cursor_y] = sub(lineBack, preStart, preStop)..rep(cur_back_colour, #writeText)..sub(lineBack, postStart, postStop) - cursor_x = pos + string.len(writeText) + text[cursor_y] = sub(lineText, preStart, preStop) .. writeText .. sub(lineText, postStart, postStop) + text_colour[cursor_y] = sub(lineColor, preStart, preStop) .. rep(cur_text_colour, #writeText) .. sub(lineColor, postStart, postStop) + back_colour[cursor_y] = sub(lineBack, preStart, preStop) .. rep(cur_back_colour, #writeText) .. sub(lineBack, postStart, postStop) + cursor_x = pos + #writeText end function redirect.blit(writeText, writeFore, writeBack) @@ -104,14 +104,14 @@ function create(original) local lineBack = back_colour[cursor_y] local preStop = cursor_x - 1 local preStart = math.min(1, preStop) - local postStart = cursor_x + string.len(writeText) + local postStart = cursor_x + #writeText local postStop = sizeX local sub = string.sub - text[cursor_y] = sub(lineText, preStart, preStop)..writeText..sub(lineText, postStart, postStop) - text_colour[cursor_y] = sub(lineColor, preStart, preStop)..writeFore..sub(lineColor, postStart, postStop) - back_colour[cursor_y] = sub(lineBack, preStart, preStop)..writeBack..sub(lineBack, postStart, postStop) - cursor_x = pos + string.len(writeText) + text[cursor_y] = sub(lineText, preStart, preStop) .. writeText .. sub(lineText, postStart, postStop) + text_colour[cursor_y] = sub(lineColor, preStart, preStop) .. writeFore .. sub(lineColor, postStart, postStop) + back_colour[cursor_y] = sub(lineBack, preStart, preStop) .. writeBack .. sub(lineBack, postStart, postStop) + cursor_x = pos + #writeText end function redirect.clear() @@ -246,8 +246,8 @@ function create(original) end end - for i=1, sizeY do - target.setCursorPos(1,i) + for i = 1, sizeY do + target.setCursorPos(1, i) target.blit(text[i], text_colour[i], back_colour[i]) end @@ -273,15 +273,15 @@ function create(original) back_colour[y] = back_colour[y]:sub(1, new_x) elseif new_x > sizeX then text[y] = text[y] .. (" "):rep(new_x - sizeX) - text_colour[y] = text_colour[y] .. (cur_text_colour):rep(new_x - sizeX) - back_colour[y] = back_colour[y] .. (cur_back_colour):rep(new_x - sizeX) + text_colour[y] = text_colour[y] .. cur_text_colour:rep(new_x - sizeX) + back_colour[y] = back_colour[y] .. cur_back_colour:rep(new_x - sizeX) end end -- Add any new lines we might need. local text_line = (" "):rep(new_x) - local fore_line = (cur_text_colour):rep(new_x) - local back_line = (cur_back_colour):rep(new_x) + local fore_line = cur_text_colour:rep(new_x) + local back_line = cur_back_colour:rep(new_x) for y = sizeY + 1, new_y do text[y] = text_line text_colour[y] = fore_line diff --git a/.mbs/lib/readline.lua b/.mbs/lib/readline.lua index ba322a6..6a78321 100644 --- a/.mbs/lib/readline.lua +++ b/.mbs/lib/readline.lua @@ -119,7 +119,7 @@ function read(opts) local _, cy = term.getCursorPos() term.setCursorPos(sx, cy) - local sReplace = (_bClear and " ") or replace_char + local sReplace = _bClear and " " or replace_char if opts.highlight and not _bClear then -- We've a highlighting function: step through each line of input @@ -209,7 +209,7 @@ function read(opts) redraw() while true do local sEvent, param, param1, param2 = os.pullEvent() - if sEvent == "char" and (nMod == 0 or nMod == 3 or (nMod == 2 and not meta_keys:find(param, 1, true))) then + if sEvent == "char" and (nMod == 0 or nMod == 3 or nMod == 2 and not meta_keys:find(param, 1, true)) then -- Typed key -- Alt+X will queue a char event, so we limit ourselves to cases where -- no modifier is used, or Ctrl+Alt are (equivalent to AltGr), or the Alt @@ -254,7 +254,7 @@ function read(opts) sLine = nil nPos = 0 break - elseif (nMod == 0 and param == keys.left) or (nMod == 1 and param == keys.b) then + elseif nMod == 0 and param == keys.left or nMod == 1 and param == keys.b then -- Left if nPos > 0 then clear() @@ -262,7 +262,7 @@ function read(opts) recomplete() redraw() end - elseif (nMod == 0 and param == keys.right) or (nMod == 1 and param == keys.f) then + elseif nMod == 0 and param == keys.right or nMod == 1 and param == keys.f then -- Right if nPos < #sLine then -- Move right @@ -292,8 +292,8 @@ function read(opts) recomplete() redraw() end - elseif (nMod == 0 and (param == keys.up or param == keys.down)) - or (nMod == 1 and (param == keys.p or param == keys.n)) then + elseif nMod == 0 and (param == keys.up or param == keys.down) + or nMod == 1 and (param == keys.p or param == keys.n) then -- Up or down if nCompletion then -- Cycle completions @@ -340,8 +340,8 @@ function read(opts) uncomplete() redraw() end - elseif (nMod == 0 and param == keys.home) - or (nMod == 1 and param == keys.a) then + elseif nMod == 0 and param == keys.home + or nMod == 1 and param == keys.a then -- Home if nPos > 0 then clear() @@ -349,8 +349,8 @@ function read(opts) recomplete() redraw() end - elseif (nMod == 0 and param == keys["end"]) - or (nMod == 1 and param == keys.e) then + elseif nMod == 0 and param == keys["end"] + or nMod == 1 and param == keys.e then -- End if nPos < #sLine then clear() @@ -371,14 +371,14 @@ function read(opts) nPos = math.min(#sLine, cur) -- We need the clear to remove the completion - clear(); recomplete(); redraw() + clear() recomplete() redraw() elseif nMod == 2 and param == keys.u then -- Upcase word if nPos < #sLine then local nNext = nextWord() sLine = nsub(1, nPos) .. nsub(nPos + 1, nNext):upper() .. nsub(nNext + 1, #sLine) nPos = nNext - clear(); recomplete(); redraw() + clear() recomplete() redraw() end elseif nMod == 2 and param == keys.l then -- Lowercase word @@ -386,7 +386,7 @@ function read(opts) local nNext = nextWord() sLine = nsub(1, nPos) .. nsub(nPos + 1, nNext):lower() .. nsub(nNext + 1, #sLine) nPos = nNext - clear(); recomplete(); redraw() + clear() recomplete() redraw() end elseif nMod == 2 and param == keys.c then -- Capitalize word @@ -395,7 +395,7 @@ function read(opts) sLine = nsub(1, nPos) .. nsub(nPos + 1, nPos + 1):upper() .. nsub(nPos + 2, nNext):lower() .. nsub(nNext + 1, #sLine) nPos = nNext - clear(); recomplete(); redraw() + clear() recomplete() redraw() end -- Killing text @@ -424,7 +424,7 @@ function read(opts) kill(sLine:sub(1, nPos)) sLine = sLine:sub(nPos + 1) nPos = 0 - recomplete(); redraw() + recomplete() redraw() end elseif nMod == 1 and param == keys.k then -- Delete from cursor to end of line @@ -433,7 +433,7 @@ function read(opts) kill(sLine:sub(nPos + 1)) sLine = sLine:sub(1, nPos) nPos = #sLine - recomplete(); redraw() + recomplete() redraw() end elseif nMod == 2 and param == keys.d then -- Delete from cursor to end of next word @@ -443,7 +443,7 @@ function read(opts) clear() kill(sLine:sub(nPos + 1, nNext)) sLine = sLine:sub(1, nPos) .. sLine:sub(nNext + 1) - recomplete(); redraw() + recomplete() redraw() end end elseif nMod == 1 and param == keys.w then @@ -455,7 +455,7 @@ function read(opts) kill(sLine:sub(nPrev + 1, nPos)) sLine = sLine:sub(1, nPrev) .. sLine:sub(nPos + 1) nPos = nPrev - recomplete(); redraw() + recomplete()redraw() end end elseif nMod == 1 and param == keys.y then @@ -464,7 +464,7 @@ function read(opts) clear() sLine = sLine:sub(1, nPos) .. insert .. sLine:sub(nPos + 1) nPos = nPos + #insert - recomplete(); redraw() + recomplete() redraw() end -- Misc elseif nMod == 0 and param == keys.tab then diff --git a/.mbs/lib/scroll_window.lua b/.mbs/lib/scroll_window.lua index 75a6fb1..b2c1044 100644 --- a/.mbs/lib/scroll_window.lua +++ b/.mbs/lib/scroll_window.lua @@ -80,14 +80,14 @@ function create(original) local lineBack = back_colour[scroll_cursor_y] local preStop = pos - 1 local preStart = math.min(1, preStop) - local postStart = pos + string.len(writeText) + local postStart = pos + #writeText local postStop = sizeX local sub, rep = string.sub, string.rep - text[scroll_cursor_y] = sub(lineText, preStart, preStop)..writeText..sub(lineText, postStart, postStop) - text_colour[scroll_cursor_y] = sub(lineColor, preStart, preStop)..rep(cur_text_colour, #writeText)..sub(lineColor, postStart, postStop) - back_colour[scroll_cursor_y] = sub(lineBack, preStart, preStop)..rep(cur_back_colour, #writeText)..sub(lineBack, postStart, postStop) - cursor_x = pos + string.len(writeText) + text[scroll_cursor_y] = sub(lineText, preStart, preStop) .. writeText .. sub(lineText, postStart, postStop) + text_colour[scroll_cursor_y] = sub(lineColor, preStart, preStop) .. rep(cur_text_colour, #writeText) .. sub(lineColor, postStart, postStop) + back_colour[scroll_cursor_y] = sub(lineBack, preStart, preStop) .. rep(cur_back_colour, #writeText) .. sub(lineBack, postStart, postStop) + cursor_x = pos + #writeText end function redirect.blit(writeText, writeFore, writeBack) @@ -131,13 +131,13 @@ function create(original) local lineBack = back_colour[scroll_cursor_y] local preStop = cursor_x - 1 local preStart = math.min(1, preStop) - local postStart = cursor_x + string.len(writeText) + local postStart = cursor_x + #writeText local postStop = sizeX local sub = string.sub - text[scroll_cursor_y] = sub(lineText, preStart, preStop)..writeText..sub(lineText, postStart, postStop) - text_colour[scroll_cursor_y] = sub(lineColor, preStart, preStop)..writeFore..sub(lineColor, postStart, postStop) - back_colour[scroll_cursor_y] = sub(lineBack, preStart, preStop)..writeBack..sub(lineBack, postStart, postStop) + text[scroll_cursor_y] = sub(lineText, preStart, preStop) .. writeText .. sub(lineText, postStart, postStop) + text_colour[scroll_cursor_y] = sub(lineColor, preStart, preStop) .. writeFore .. sub(lineColor, postStart, postStop) + back_colour[scroll_cursor_y] = sub(lineBack, preStart, preStop) .. writeBack .. sub(lineBack, postStart, postStop) cursor_x = pos + #writeText end @@ -149,8 +149,8 @@ function create(original) end local text_line = (" "):rep(sizeX) - local fore_line = (cur_text_colour):rep(sizeX) - local back_line = (cur_back_colour):rep(sizeX) + local fore_line = cur_text_colour:rep(sizeX) + local back_line = cur_back_colour:rep(sizeX) for i = scroll_offset + 1, sizeY + scroll_offset do text[i] = text_line @@ -331,7 +331,7 @@ function create(original) local original = original local scroll_offset = scroll_offset + (offset or 0) for i = 1, sizeY do - original.setCursorPos(1,i) + original.setCursorPos(1, i) local yOffset = scroll_offset + i original.blit(text[yOffset], text_colour[yOffset], back_colour[yOffset]) end @@ -422,16 +422,16 @@ function create(original) back_colour[y] = back_colour[y]:sub(1, new_x) elseif new_x > sizeX then text[y] = text[y] .. (" "):rep(new_x - sizeX) - text_colour[y] = text_colour[y] .. (cur_text_colour):rep(new_x - sizeX) - back_colour[y] = back_colour[y] .. (cur_back_colour):rep(new_x - sizeX) + text_colour[y] = text_colour[y] .. cur_text_colour:rep(new_x - sizeX) + back_colour[y] = back_colour[y] .. cur_back_colour:rep(new_x - sizeX) end end if new_y > sizeY then -- Append any new lines we might need. local text_line = (" "):rep(new_x) - local fore_line = (cur_text_colour):rep(new_x) - local back_line = (cur_back_colour):rep(new_x) + local fore_line = cur_text_colour:rep(new_x) + local back_line = cur_back_colour:rep(new_x) for y = total_height + 1, new_y do text[y] = text_line text_colour[y] = fore_line diff --git a/.mbs/lib/stack_trace.lua b/.mbs/lib/stack_trace.lua index 7674813..2c94dcd 100644 --- a/.mbs/lib/stack_trace.lua +++ b/.mbs/lib/stack_trace.lua @@ -5,7 +5,7 @@ local function traceback(x) -- Attempt to detect error() and error("xyz", 0). -- This probably means they're erroring the program intentionally and so we -- shouldn't display anything. - if x == nil or (type(x) == "string" and not x:find(":%d+:")) then + if x == nil or type(x) == "string" and not x:find(":%d+:") then return x end @@ -65,7 +65,7 @@ local function xpcall_with(fn) -- Find the position where the stack traceback actually starts local trace_starts for i = #trace, 1, -1 do - if trace[i] == "stack traceback:" then trace_starts = i; break end + if trace[i] == "stack traceback:" then trace_starts = i break end end -- If this traceback is more than 15 elements long, keep the first 9, last 5 diff --git a/.mbs/modules/lua.lua b/.mbs/modules/lua.lua index d9453e6..b470f0b 100644 --- a/.mbs/modules/lua.lua +++ b/.mbs/modules/lua.lua @@ -10,7 +10,7 @@ return { dependencies = { "bin/lua.lua", - "lib/stack_trace.lua" + "lib/stack_trace.lua", }, -- When updating the defaults, one should also update bin/lua.lua @@ -36,13 +36,13 @@ return { default = true, }, { - name= "mbs.lua.pretty_height", + name = "mbs.lua.pretty_height", description = "The height to fit the pretty-printer output to. Set to " .. "false to disable, true to use the terminal height or a number for a constant height.", default = true, }, { - name= "mbs.lua.highlight", + name = "mbs.lua.highlight", description = "Whether to apply syntax highlighting to the REPL's input.", default = true, }, @@ -54,5 +54,5 @@ return { lib_load(path, "stack_trace") shell.setAlias("lua", "/" .. fs.combine(path, "bin/lua.lua")) - end + end, }
\ No newline at end of file diff --git a/.mbs/modules/pager.lua b/.mbs/modules/pager.lua index 7c25afb..663c7fa 100644 --- a/.mbs/modules/pager.lua +++ b/.mbs/modules/pager.lua @@ -2,7 +2,7 @@ return { description = "Replaces the textutils pagers with something akin to less", dependencies = { - "bin/help.lua" + "bin/help.lua", }, settings = { @@ -15,7 +15,7 @@ return { name = "mbs.pager.mode", description = "The mode for the alternative pager.", default = "default", - } + }, }, enabled = function() return settings.get("mbs.pager.enabled") end, @@ -44,5 +44,5 @@ return { return native_ptabulate(...) end end - end + end, }
\ No newline at end of file diff --git a/.mbs/modules/readline.lua b/.mbs/modules/readline.lua index 4dea9eb..0bb4c67 100644 --- a/.mbs/modules/readline.lua +++ b/.mbs/modules/readline.lua @@ -31,7 +31,7 @@ return { name = "mbs.readline.complete_fg", description = "The foreground colour for completions.", default = "grey", - } + }, }, enabled = function() return settings.get("mbs.readline.enabled") end, |
