don't pass an addon command's name to it as an extra argument

This commit is contained in:
Simon Michael 2011-09-11 21:48:13 +00:00
parent f37d7b5659
commit 8a50cb1289

View File

@ -87,7 +87,8 @@ main = do
showModeHelpOr mode f | "help" `in_` (rawopts_ opts) = putStr $ showModeHelp mode
| otherwise = f
matchedaddon = headDef "" $ filter (cmd `isPrefixOf`) addons
shellcmd = printf "%s-%s %s" progname matchedaddon (unwords' args)
shellcmd = printf "%s-%s %s" progname matchedaddon (unwords' argswithoutcmd)
argswithoutcmd = args1 ++ drop 1 args2 where (args1,args2) = break (== cmd) args
{- tests: