mirror of
https://github.com/NorfairKing/feedback.git
synced 2024-11-26 13:21:05 +03:00
Don't filter out empty arguments
This commit is contained in:
parent
f3a1f3938a
commit
4c6126b887
@ -17,6 +17,7 @@ import Data.Maybe
|
|||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
import Data.Version
|
import Data.Version
|
||||||
import Data.Yaml (FromJSON, ToJSON)
|
import Data.Yaml (FromJSON, ToJSON)
|
||||||
|
import Debug.Trace
|
||||||
import qualified Env
|
import qualified Env
|
||||||
import GHC.Generics (Generic)
|
import GHC.Generics (Generic)
|
||||||
import Options.Applicative as OptParse
|
import Options.Applicative as OptParse
|
||||||
@ -348,9 +349,10 @@ parseCommandFlags =
|
|||||||
'\'' -> "\\\'"
|
'\'' -> "\\\'"
|
||||||
c -> [c]
|
c -> [c]
|
||||||
quote = ("\"" <>) . (<> "\"") . concatMap escapeChar
|
quote = ("\"" <>) . (<> "\"") . concatMap escapeChar
|
||||||
|
quoteIfNecessary "" = quote ""
|
||||||
quoteIfNecessary s = if ' ' `elem` s then quote s else s
|
quoteIfNecessary s = if ' ' `elem` s then quote s else s
|
||||||
pieceBackTogether = unwords . map quoteIfNecessary
|
pieceBackTogether = unwords . map quoteIfNecessary
|
||||||
in pieceBackTogether <$> many commandArg
|
in pieceBackTogether . traceShowId <$> many commandArg
|
||||||
|
|
||||||
defaultConfigFileCompleter :: IO [String]
|
defaultConfigFileCompleter :: IO [String]
|
||||||
defaultConfigFileCompleter = do
|
defaultConfigFileCompleter = do
|
||||||
|
Loading…
Reference in New Issue
Block a user