aboutsummaryrefslogtreecommitdiff
path: root/fs.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-08-27 12:46:08 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-09-24 15:16:19 +0200
commitb4e9ac214f7eee5c0dacb4476c4a0a5721db42b5 (patch)
treeaacefdc6e7152906cd16704a25737de0a553980c /fs.lua
parent9f2761eeb01004ce96c45e000ef907778c51c79f (diff)
downloadvicious-legacy-b4e9ac214f7eee5c0dacb4476c4a0a5721db42b5.tar.xz
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.
Diffstat (limited to 'fs.lua')
-rw-r--r--fs.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs.lua b/fs.lua
index 73106b8..d5b0031 100644
--- a/fs.lua
+++ b/fs.lua
@@ -27,7 +27,7 @@ local function worker(format)
-- table for each mount point with gmatch
local size, used, avail, usep, mount =
-- 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.." used}"] = used