Skip to content
/ aerger Public

A little library for parsing command-line args in OCaml

Notifications You must be signed in to change notification settings

rapha/aerger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A little library for parsing command-line args.

let awesomeness, is_fast, color = Aerger.(
  with_usage "demo --awesomeness=99 -c BLUE --go_faster" (fun _ ->
    require (float ~names:["awesomeness"] ~desc:"How awesome to be" ~default:11.),
    require (bool ["go_faster"]),
    match get (enum ["c"; "color"] ["RED"; "GREEN"; "BLUE"]) with | Some color -> color | None -> "unspecified"
  )
) in

Printf.printf "fast? %b\nawesomeness: %f\ncolor: %s\n" is_fast awesomeness color;
List.iter print_endline (Aerger.rest ())

About

A little library for parsing command-line args in OCaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages