improve match explanations

Using == and != proved too hard to read, so went with [TRUE] and [FALSE]
after the term. I would kind of liked to have used emojis for a green
check and red X, but probably that is too fancy to be a good idea.

Make --explain output be inside [ ] with whitespace around them, to
avoid it ending with eg "[FALSE]]" and to make it easier to visually
find the start of it.

Sponsored-by: Dartmouth College's DANDI project
This commit is contained in:
Joey Hess 2023-07-26 15:29:23 -04:00
parent 08071a1b90
commit 499d014123
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 24 additions and 4 deletions

View file

@ -306,7 +306,7 @@ explain ai (Just msg) = do
when (Annex.explainenabled rd) $
let d = actionItemDesc ai
in outputMessage JSON.none id $
"[" <> (if d == mempty then "" else (d <> " ")) <> msg <> "]\n"
"[ " <> (if d == mempty then "" else (d <> " ")) <> msg <> " ]\n"
explain _ _ = return ()
{- Prevents any concurrent console access while running an action, so