diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-12-29 22:32:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-12-29 22:32:00 +0100 |
commit | 5eb872dbc6bbc35e222d5b23fc783fb0e75d4a99 (patch) | |
tree | 91164a948df7bcf12b5423db3ef1b310ca2b5017 /tex/context/base/l-io.lua | |
parent | 326b0613f1ed21f5711a8d94403512171c058e48 (diff) | |
download | context-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.lua | 6 |
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 |