BSD-3-Clause licensed by Jens Petersen
This version can be pinned in stack with:simple-cmd-args-0.1.5@sha256:7ffce6036a780cb662c7e09ee7173101365e429bb9f2ce019d52a8b22013401e,1490
Module documentation for 0.1.5
simple-cmd-args
A thin layer over optparse-applicative that avoids type plumbing for
subcommands by using Parser (IO ())
.
Usage
import SimpleCmdArgs
import Control.Applicative (some)
import SimpleCmd (cmd_)
main =
simpleCmdArgs Nothing "my example tool" "Longer description..." $
subcommands
[ Subcommand "echo" "Print name" $ putStrLn <$> strArg "NAME"
, Subcommand "ls" "Touch FILE" $ cmd_ "ls" <$> some (strArg "FILE...")
]
See more examples.
Changelog
simple-cmd-args
uses PVP Versioning.
0.1.5 (2020-02-06)
- add Eq and Ord instances for Subcommand
0.1.4 (2019-10-29)
- export many, some, str
- export <$> and <*> on older ghc7
0.1.3 (2019-09-12)
0.1.2 (2019-05-24)
- add flagWith and flagWith’
- export Parser, auto, optional
0.1.1 (2019-04-08)
- add switchWith, strOptionWith, optionWith, optionalWith,
strOptionalWith, argumentWith
- export simpleCmdArgsWithMods
0.1.0.1
- fix and improve haddock documentation
0.1.0
- Initial release with subcommands and option Mod functions