projects
/
oweals
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Translated using Weblate (Portuguese)
[oweals/luci.git]
/
modules
/
luci-base
/
luasrc
/
util.lua
diff --git
a/modules/luci-base/luasrc/util.lua
b/modules/luci-base/luasrc/util.lua
index f16b3afb2e236ef3489cb58b14ab9e1cf893c2d7..a30e8b72f31466d28bec20792c6648c9b6989cb2 100644
(file)
--- a/
modules/luci-base/luasrc/util.lua
+++ b/
modules/luci-base/luasrc/util.lua
@@
-207,9
+207,8
@@
end
-- handling. It may actually be a property of the getopt function
-- rather than the shell proper.
function shellstartsqescape(value)
-- handling. It may actually be a property of the getopt function
-- rather than the shell proper.
function shellstartsqescape(value)
- res, _ = string.gsub(value, "^\-", "\\-")
- res, _ = string.gsub(res, "^-", "\-")
- return shellsqescape(value)
+ res, _ = string.gsub(value, "^%-", "\\-")
+ return shellsqescape(res)
end
-- containing the resulting substrings. The optional max parameter specifies
end
-- containing the resulting substrings. The optional max parameter specifies
@@
-262,7
+261,7
@@
end
-- one token per invocation, the tokens are separated by whitespace. If the
-- input value is a table, it is transformed into a string first. A nil value
-- one token per invocation, the tokens are separated by whitespace. If the
-- input value is a table, it is transformed into a string first. A nil value
--- will result in a valid i
n
terator which aborts with the first invocation.
+-- will result in a valid iterator which aborts with the first invocation.
function imatch(v)
if type(v) == "table" then
local k = nil
function imatch(v)
if type(v) == "table" then
local k = nil