Match all punctuation chars in fs partitions and mount points.
With some recent commits we are matching a good number of custom characters. Instead of waiting for another one that breaks it, just match all punctuation characters. The regexp is pretty big and some simplification is also welcomed.
This commit is contained in:
parent
0ca1fd3cf3
commit
13527a38e8
2
fs.lua
2
fs.lua
|
@ -27,7 +27,7 @@ local function worker(format)
|
||||||
-- table for each mount point with gmatch
|
-- table for each mount point with gmatch
|
||||||
local size, used, avail, usep, mount =
|
local size, used, avail, usep, mount =
|
||||||
-- Instead match all at once, including network file systems
|
-- Instead match all at once, including network file systems
|
||||||
line:match("^[/%w:%.-]+[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d]+)%%[%s]+([/%w:%.-]+)$")
|
line:match("^[%w%p]+[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d%.]+)[%a]?[%s]+([%d]+)%%[%s]+([%w%p]+)$")
|
||||||
|
|
||||||
fs_info["{"..mount.." size}"] = size
|
fs_info["{"..mount.." size}"] = size
|
||||||
fs_info["{"..mount.." used}"] = used
|
fs_info["{"..mount.." used}"] = used
|
||||||
|
|
Loading…
Reference in New Issue