add startingNoMessage

Fixes the last wart in the StartMessage transition. A few commands
include other CommandStart actions that generate output, and
do not themselves need to display a start/end message.
This commit is contained in:
Joey Hess 2019-06-12 14:11:23 -04:00
parent 70bc30acb1
commit ba2551da6f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 17 additions and 7 deletions

View file

@ -47,14 +47,18 @@ data StartMessage
| StartUsualMessages String ActionItem
-- ^ Like StartMessage, but makes sure to enable usual message
-- display in case it was disabled by cmdnomessages.
| StartNoMessage ActionItem
-- ^ Starts, without displaying any message but also without
-- disabling display of any of the usual messages.
| CustomOutput ActionItem
-- ^ Prevents any start, end, or other implicit messages from
-- ^ Prevents any start, end, or other usual messages from
-- being displayed, letting a command output its own custom format.
deriving (Show)
instance MkActionItem StartMessage where
mkActionItem (StartMessage _ ai) = ai
mkActionItem (StartUsualMessages _ ai) = ai
mkActionItem (StartNoMessage ai) = ai
mkActionItem (CustomOutput ai) = ai
{- A command is defined by specifying these things. -}