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

@@ -28,10 +28,15 @@ let peers = function
Printf.printf "Peers in %s\n" Logarion.Peers.text_dir;
Logarion.Peers.fold print_peer ()
open Ocmd
let term =
let remove = Arg.(value & opt (some string) None & info ["remove"]
~docv:"repository ID" ~doc:"remove repository texts & from future pulling") in
Term.(const peers $ remove),
Term.info "peers" ~doc:"list current peers" ~man:[ `S "DESCRIPTION";
`P "Lists current peers and associated information"]
open Cmdliner
let remove = Arg.(value & opt (some string) None & info ["remove"] ~docv:"Repository ID" ~doc:"Remove repository texts and from future pulling")
let peers_t = Term.(const peers $ remove)
let cmd =
let doc = "List current peers" in
let man = [
`S Manpage.s_description;
`P "List current peers and associated information" ]
in
let info = Cmd.info "peers" ~version:"%%VERSION%%" ~doc ~man in
Cmd.v info peers_t