diff --git a/lib/awful/completion.lua.in b/lib/awful/completion.lua.in index accbec138..ef1200b44 100644 --- a/lib/awful/completion.lua.in +++ b/lib/awful/completion.lua.in @@ -40,8 +40,12 @@ function bashcomp_load(src) end local function bash_escape(str) - res = str:gsub(" ", "\\ ") - return res + str = str:gsub(" ", "\\ ") + str = str:gsub("%[", "\\[") + str = str:gsub("%]", "\\]") + str = str:gsub("%(", "\\(") + str = str:gsub("%)", "\\)") + return str end --- Use bash completion system to complete command and filename.