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:
yakumo.izuru
2024-08-21 01:37:05 +00:00
parent 3f090772ce
commit d310d041ce
17 changed files with 271 additions and 233 deletions

View File

@@ -20,9 +20,16 @@ let last search_mine =
| None -> ()
| Some (_, f) -> List.iter print_endline f
open Ocmd
let term =
let mine = Arg.(value & flag & info ["mine"] ~doc:"last text authored by me") in
Term.(const last $ mine),
Term.info "last" ~doc:"most recent text"
~man:[ `S "DESCRIPTION"; `P "Print the filename of most recent text" ]
open Cmdliner
let mine = Arg.(value & flag & info ["mine"] ~doc: "Last text authored by me")
let last_t = Term.(const last $ mine)
let cmd =
let doc = "Most recent text" in
let man = [
`S Manpage.s_description;
`P "Print the filename of most recent text" ]
in
let info = Cmd.info "last" ~version:"%%VERSION%%" ~doc ~man in
Cmd.v info last_t