From 65e7707df0b7bea9743181e4116fce724fa1d290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 5 Mar 2014 21:04:24 +0100 Subject: [PATCH] more local --- .../resources/assets/opencomputers/lua/rom/bin/besh.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/assets/opencomputers/lua/rom/bin/besh.lua b/src/main/resources/assets/opencomputers/lua/rom/bin/besh.lua index ad5d7b25c..f118d725c 100644 --- a/src/main/resources/assets/opencomputers/lua/rom/bin/besh.lua +++ b/src/main/resources/assets/opencomputers/lua/rom/bin/besh.lua @@ -11,7 +11,7 @@ local term = require("term") local text = require("text") local unicode = require("unicode") -function expandParam(param) +local function expandParam(param) local par, word, op = nil, nil, nil for _, oper in ipairs{':%-', '%-', ':=', '=', ':%?','%?', ':%+', '%+'} do par, word = param:match("(.-)"..oper.."(.*)") @@ -86,11 +86,11 @@ function expandParam(param) end end -function expandCmd(cmd) +local function expandCmd(cmd) return cmd end -function expandMath(expr) +local function expandMath(expr) local success, reason = load("return "..expr, os.getenv("SHELL"), 't', {}) if success then return success() @@ -99,7 +99,7 @@ function expandMath(expr) end end -function expand(token) +local function expand(token) local expr = {} local matchStack = {} local escaped = false