simple-cmd-args

Simple command args parsing and execution https://github.com/juhp/simple-cmd-args

Version on this page:0.1.0.1
LTS Haskell 13.13:0.1.0.1
Stackage Nightly 2019-03-20:0.1.0.1
Latest on Hackage:0.1.0.1

See all snapshots simple-cmd-args appears in

BSD-3-Clause licensed by Jens Petersen
Maintained by juhpetersen@gmail.com

Module documentation for 0.1.0.1

simple-cmd-args

Hackage BSD license Stackage Lts Stackage Nightly Build status

A thin layer over optparse-applicative that avoids type plumbing for commands by using Parser (IO ()). It also supports with subcommands.

Usage

import SimpleCmdArgs
import Control.Applicative (some)
import SimpleCmd (cmd_)

main =
  simpleCmdArgs Nothing "my example tool" "Longer description..." $
  subcommands
    [ Subcommand "echo" (putStrLn <$> strArg "NAME") "Print name"
    , Subcommand "ls" (cmd_ "ls" <$> some (strArg "FILE...")) "Touch FILE"
    ]

See more examples.

Changes

Changelog

simple-cmd-args uses PVP Versioning.

0.1.0.1

  • fix and improve haddock documentation

0.1.0

  • Initial release with subcommands and option Mod functions
Depends on 2 packages:
Used by 1 package:
comments powered byDisqus