shrun-0.9: A utility program for running shell commands concurrently.
Safe HaskellNone
LanguageGHC2021

Shrun.Configuration.Data.Truncation

Contents

Synopsis

Documentation

data TruncRegion Source #

The different regions to apply truncation rules.

Constructors

TruncCommandName

Apply truncation rules to commands/key names.

TruncLine

Apply truncation rules to command log entire lines.

Instances

Instances details
Show TruncRegion Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Eq TruncRegion Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

newtype Truncation (a :: TruncRegion) Source #

The maximum number of command characters to display in the logs.

Constructors

MkTruncation 

Instances

Instances details
(k ~ An_Iso, a ~ Natural, b ~ Natural) => LabelOptic "unTruncation" k (Truncation r) (Truncation r) a b Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Num (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Show (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Eq (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

Methods

(==) :: Truncation a -> Truncation a -> Bool #

(/=) :: Truncation a -> Truncation a -> Bool #

Ord (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

DecodeTOML (Truncation a) Source # 
Instance details

Defined in Shrun.Configuration.Data.Truncation

parseTruncation :: forall m (r :: TruncRegion). MonadFail m => m Natural -> m (Truncation r) Source #

data LineTruncation Source #

Determines command log line truncation behavior. We need a separate type from Truncation to add a third option, to detect the terminal size automatically.

Misc

configToLineTrunc :: (HasCallStack, MonadTerminal m) => WithDisabled LineTruncation -> m (Maybe (Truncation 'TruncLine)) Source #

Maps line trunc config to actual value.