Migrate the codebase to the latest revision of Cmdliner
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/kosuzu/trunk@66 eb64cd80-c68d-6f47-b6a3-0ada418499da
This commit is contained in:
@@ -6,12 +6,17 @@ let authors r topics_opt =
|
||||
let s = File_store.fold ~r ~predicate author_union Person.Set.empty in
|
||||
Person.Set.iter (fun x -> print_endline (Person.to_string x)) s
|
||||
|
||||
open Ocmd
|
||||
let term =
|
||||
let recurse = Arg.(value & flag & info ["R"]
|
||||
~doc:"include texts in subdirectories too") in
|
||||
let topics = Arg.(value & opt (some string) None & info ["topics"]
|
||||
~docv:"TOPICS" ~doc:"display authors who have written on topics") in
|
||||
Term.(const authors $ recurse $ topics),
|
||||
Term.info "authors" ~doc:"list authors"
|
||||
~man:[ `S "DESCRIPTION"; `P "List author names" ]
|
||||
open Cmdliner
|
||||
let recurse = Arg.(value & flag & info ["R"] ~doc: "Include texts in subdirectories too")
|
||||
let topics = Arg.(value & opt (some string) None & info ["topics"] ~docv:"topics" ~doc: "Display authors who have written on topics")
|
||||
|
||||
let authors_t = Term.(const authors $ recurse $ topics)
|
||||
|
||||
let cmd =
|
||||
let doc = "List authors" in
|
||||
let man = [
|
||||
`S Manpage.s_description;
|
||||
`P "List author names" ]
|
||||
in
|
||||
let info = Cmd.info "authors" ~version:"%%VERSION%%" ~doc ~man in
|
||||
Cmd.v info authors_t
|
||||
|
||||
Reference in New Issue
Block a user