Changeset 66 in code for trunk/cli/last.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/last.ml

    r65 r66  
    2121        | Some (_, f) -> List.iter print_endline f
    2222
    23 open Ocmd
    24 let term =
    25         let mine = Arg.(value & flag & info ["mine"] ~doc:"last text authored by me") in
    26         Term.(const last $ mine),
    27         Term.info "last" ~doc:"most recent text"
    28                 ~man:[ `S "DESCRIPTION"; `P "Print the filename of most recent text" ]
     23open Cmdliner
     24
     25let mine = Arg.(value & flag & info ["mine"] ~doc: "Last text authored by me")
     26let last_t = Term.(const last $ mine)
     27
     28let cmd =
     29  let doc = "Most recent text" in
     30  let man = [
     31      `S Manpage.s_description;
     32      `P "Print the filename of most recent text" ]
     33  in
     34  let info = Cmd.info "last" ~version:"%%VERSION%%" ~doc ~man in
     35  Cmd.v info last_t
Note: See TracChangeset for help on using the changeset viewer.