summaryrefslogtreecommitdiff
path: root/tex/context/base/l-io.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-12-29 22:32:00 +0100
committerHans Hagen <pragma@wxs.nl>2009-12-29 22:32:00 +0100
commit5eb872dbc6bbc35e222d5b23fc783fb0e75d4a99 (patch)
tree91164a948df7bcf12b5423db3ef1b310ca2b5017 /tex/context/base/l-io.lua
parent326b0613f1ed21f5711a8d94403512171c058e48 (diff)
downloadcontext-5eb872dbc6bbc35e222d5b23fc783fb0e75d4a99.tar.gz
beta 2009.12.29 22:32
Diffstat (limited to 'tex/context/base/l-io.lua')
-rw-r--r--tex/context/base/l-io.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/tex/context/base/l-io.lua b/tex/context/base/l-io.lua
index 0d0357039..5a126da7b 100644
--- a/tex/context/base/l-io.lua
+++ b/tex/context/base/l-io.lua
@@ -6,7 +6,7 @@ if not modules then modules = { } end modules ['l-io'] = {
license = "see context related readme files"
}
-local byte = string.byte
+local byte, find, gsub = string.byte, string.find, string.gsub
if string.find(os.getenv("PATH"),";") then
io.fileseparator, io.pathseparator = "\\", ";"
@@ -164,7 +164,7 @@ function io.ask(question,default,options)
end
io.write(string.format(" "))
local answer = io.read()
- answer = answer:gsub("^%s*(.*)%s*$","%1")
+ answer = gsub(answer,"^%s*(.*)%s*$","%1")
if answer == "" and default then
return default
elseif not options then
@@ -177,7 +177,7 @@ function io.ask(question,default,options)
end
local pattern = "^" .. answer
for _,v in pairs(options) do
- if v:find(pattern) then
+ if find(v,pattern) then
return v
end
end