fix single-quote-containing addon arguments harder
This commit is contained in:
parent
0d1d3ed057
commit
9d10cfa180
@ -136,7 +136,7 @@ words' s = map stripquotes $ fromparse $ parsewith p s
|
||||
|
||||
-- | Quote-aware version of unwords - single-quote strings which contain whitespace
|
||||
unwords' :: [String] -> String
|
||||
unwords' = unwords . map singleQuoteIfNeeded
|
||||
unwords' = unwords . map quoteIfNeeded
|
||||
|
||||
-- | Strip one matching pair of single or double quotes on the ends of a string.
|
||||
stripquotes :: String -> String
|
||||
|
||||
@ -255,7 +255,7 @@ main = do
|
||||
| isExternalCommand = do
|
||||
let shellcmd = printf "%s-%s %s" progname cmd (unwords' argsaftercmd) :: String
|
||||
dbgM "external command selected" cmd
|
||||
dbgM "external command arguments" argsaftercmd
|
||||
dbgM "external command arguments" (map quoteIfNeeded argsaftercmd)
|
||||
dbgM "running shell command" shellcmd
|
||||
system shellcmd >>= exitWith
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user