From 8a50cb12897350efe3df8accf8cc189aa8c4a149 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 11 Sep 2011 21:48:13 +0000 Subject: [PATCH] don't pass an addon command's name to it as an extra argument --- hledger/Hledger/Cli/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Main.hs b/hledger/Hledger/Cli/Main.hs index a625b2566..169277b89 100644 --- a/hledger/Hledger/Cli/Main.hs +++ b/hledger/Hledger/Cli/Main.hs @@ -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: