1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-12 03:13:00 +00:00

Allow lua REPL to warn about using local variables (#367)

`local varname = value` results in `varname` being inaccessible in
the next REPL input. This is often unintended and can lead to confusing
behaviour. We produce a warning when this occurs.
This commit is contained in:
Lupus590
2020-05-08 16:07:33 +01:00
committed by GitHub
parent 5739285fc2
commit 44062ebd52
2 changed files with 12 additions and 0 deletions

View File

@@ -932,6 +932,11 @@ settings.define("motd.path", {
description = [[The path to load random messages from. Should be a colon (":") separated string of file paths.]],
type = "string",
})
settings.define("lua.warn_against_use_of_local", {
default = true,
description = [[Print a message when input in the Lua REPL starts with the word 'local'. Local variables defined in the Lua REPL are be inaccessable on the next input.]],
type = "boolean",
})
if term.isColour() then
settings.define("bios.use_multishell", {
default = true,