hxbrief: Add --label to override command invocation string

master
Lennart Spitzner 2022-02-24 21:55:23 +00:00
parent 3cacc98227
commit 78ee1ecb3a
1 changed files with 5 additions and 1 deletions

View File

@ -423,6 +423,7 @@ main = B.mainFromCmdParser $ do
conflateBoth <- B.addSimpleBoolFlag "" ["conflate"] mempty
summarize <- B.addFlagStringParams "s" ["summarize"] "PATTERN" mempty
skip <- B.addFlagStringParams "x" ["skip"] "PATTERN" mempty
label <- B.addFlagStringParams "" ["label"] "STRING" mempty
omitSummary <- B.addSimpleBoolFlag "" ["omit-summary"] mempty
tee <- B.addFlagStringParams
""
@ -503,7 +504,10 @@ main = B.mainFromCmdParser $ do
line0 <- openConsoleRegion Linear
pure State
{ s_config = Config
{ c_command = unwords $ map quoteIfSpaces rest
{ c_command = case label of
[] -> unwords $ map quoteIfSpaces rest
[labelStr] -> labelStr
_ -> error "too many labels!"
, c_lines = numLines
, c_keepStdout = if
| stdoutCheckCount > 1 -> error