From 4c6126b8877d23b2317ce4cbac99937ea2831013 Mon Sep 17 00:00:00 2001 From: Tom Sydney Kerckhove Date: Mon, 14 Nov 2022 15:55:09 +0100 Subject: [PATCH] Don't filter out empty arguments --- feedback/src/Feedback/Common/OptParse.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feedback/src/Feedback/Common/OptParse.hs b/feedback/src/Feedback/Common/OptParse.hs index 07c82f1..a8e4009 100644 --- a/feedback/src/Feedback/Common/OptParse.hs +++ b/feedback/src/Feedback/Common/OptParse.hs @@ -17,6 +17,7 @@ import Data.Maybe import qualified Data.Text as T import Data.Version import Data.Yaml (FromJSON, ToJSON) +import Debug.Trace import qualified Env import GHC.Generics (Generic) import Options.Applicative as OptParse @@ -348,9 +349,10 @@ parseCommandFlags = '\'' -> "\\\'" c -> [c] quote = ("\"" <>) . (<> "\"") . concatMap escapeChar + quoteIfNecessary "" = quote "" quoteIfNecessary s = if ' ' `elem` s then quote s else s pieceBackTogether = unwords . map quoteIfNecessary - in pieceBackTogether <$> many commandArg + in pieceBackTogether . traceShowId <$> many commandArg defaultConfigFileCompleter :: IO [String] defaultConfigFileCompleter = do