butcher-1.1.0.0: Chops a command or program invocation into digestable pieces.

Safe HaskellNone
LanguageHaskell2010

UI.Butcher.Monadic.BuiltinCommands

Description

Some CmdParser actions that add predefined commands.

Synopsis

Documentation

addHelpCommand :: Applicative f => CommandDesc () -> CmdParser f (IO ()) () Source #

Adds a proper full help command. To obtain the CommandDesc value, see cmdRunParserWithHelpDesc or mainFromCmdParserWithHelpDesc.

addHelpCommandShallow :: Applicative f => CmdParser f (IO ()) () Source #

Adds a help command that prints help for the command currently in context.

This version does _not_ include further childcommands, i.e. "help foo" will not print the help for subcommand "foo".

This also yields slightly different output depending on if it is used before or after adding other subcommands. In general addHelpCommand should be preferred.

addButcherDebugCommand :: Applicative f => CmdParser f (IO ()) () Source #

Prints the raw CommandDesc structure.