Changeset 66 in code for trunk/cli/topics.ml


Ignore:
Timestamp:
Aug 21, 2024, 1:37:05 AM (8 months ago)
Author:
yakumo.izuru
Message:

Migrate the codebase to the latest revision of Cmdliner

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/topics.ml

    r65 r66  
    77        print_endline @@ String_set.to_string s
    88
    9 open Ocmd
    10 let term =
    11         let recurse = Arg.(value & flag & info ["R"]
    12                 ~doc:"include texts in subdirectories") in
    13         let authed = Arg.(value & opt (some string) None & info ["authored"]
    14                 ~docv:"comma-separated authors" ~doc:"topics by authors") in
    15         Term.(const topics $ recurse $ authed),
    16                 Term.info "topics" ~doc:"list topics" ~man:[ `S "DESCRIPTION";
    17                         `P "List of topics" ]
     9open Cmdliner
     10let recurse = Arg.(value & flag & info ["R"] ~doc: "Include texts in subdirectories")
     11let authed = Arg.(value & opt (some string) None & info ["authored"] ~docv: "Comma-separated authors" ~doc: "Topics by authors")
     12let topics_t = Term.(const topics $ recurse $ authed)
     13
     14let cmd =
     15  let doc = "List topics" in
     16  let man = [
     17      `S Manpage.s_description;
     18      `P "List of topics" ]
     19  in
     20  let info = Cmd.info "topics" ~version:"%%VERSION%%" ~doc ~man in
     21  Cmd.v info topics_t
Note: See TracChangeset for help on using the changeset viewer.