cmus: use correct shell escape function
This commit is contained in:
parent
5f6acea35c
commit
94f91c57ab
|
@ -11,12 +11,10 @@ local string = { gmatch = string.gmatch, format = string.format }
|
||||||
local helpers = require("vicious.helpers")
|
local helpers = require("vicious.helpers")
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
|
||||||
-- Cmus: provides CMUS information
|
-- Cmus: provides CMUS information
|
||||||
-- vicious.widgets.cmus
|
-- vicious.widgets.cmus
|
||||||
local cmus_all = {}
|
local cmus_all = {}
|
||||||
|
|
||||||
|
|
||||||
-- {{{ CMUS widget type
|
-- {{{ CMUS widget type
|
||||||
local function worker(format, warg)
|
local function worker(format, warg)
|
||||||
local cmus_state = {
|
local cmus_state = {
|
||||||
|
@ -42,7 +40,7 @@ local function worker(format, warg)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get data from CMUS server
|
-- Get data from CMUS server
|
||||||
local f = io.popen("cmus-remote --query --server " .. helpers.escape(host))
|
local f = io.popen("cmus-remote --query --server " .. helpers.shellquote(host))
|
||||||
|
|
||||||
for line in f:lines() do
|
for line in f:lines() do
|
||||||
for module, value in string.gmatch(line, "([%w]+) (.*)$") do
|
for module, value in string.gmatch(line, "([%w]+) (.*)$") do
|
||||||
|
|
Loading…
Reference in New Issue