It's a bug with gsub usage in helpers.lua, format function. The dash "-"
should be escaped at the time substitution happens. Example:
foo = "{/media/sam2-ntfs avail_p}"
bar = 99
format = "${/media/sam2-ntfs avail_p}"
print(format:gsub("$" .. foo, bar))
${/media/sam2-ntfs avail_p} 0
foo = "{/media/sam2%-ntfs avail_p}"
print(format:gsub("$" .. foo, bar))
99 1
What is sensible to do in the code?
format = format:gsub("$" .. foo:gsub("-", "%%-"), bar)
...
return format
I f* hate the idea of doing that extra substitution step. Psychon help!
--
Adrian C. (anrxc) | anrxc..sysphere.org | PGP ID: D20A0618
PGP FP: 02A5 628A D8EE 2A93 996E 929F D5CB 31B7 D20A 0618
--
To unsubscribe, send mail to [email protected].