···172172 Cmd.group (Cmd.info "tool") ~default @@
173173 [Cmd_import.cmd; Cmd_serve.cmd; Cmd_user.cmd]
174174175175-let main () = Cmd.value' cmd
175175+let main () = Cmd.eval' cmd
176176let () = if !Sys.interactive then () else exit (main ())
177177]}
178178···254254{[
255255let infile =
256256 let doc = "$(docv) is the file to read from. Use $(b,-) for $(b,stdin)" in
257257- Arg.(value & opt string "-" & info ["i", "input-file"] ~doc ~docv:"FILE")
257257+ Arg.(value & opt filepath "-" & info ["i", "input-file"] ~doc ~docv:"FILE")
258258259259let outfile =
260260 let doc = "$(docv) is the file to write to. Use $(b,-) for $(b,stdout)" in
261261- Arg.(value & opt string "-" & info ["o", "output-file"] ~doc ~docv:"FILE")
261261+ Arg.(value & opt filepath "-" & info ["o", "output-file"] ~doc ~docv:"FILE")
262262]}
263263264264Here is {!Stdlib} based code to read to a string a file or standard
···660660let flag = Arg.(value & flag & info ["flag"] ~doc:"The flag")
661661let infile =
662662 let doc = "$(docv) is the input file. Use $(b,-) for $(b,stdin)." in
663663- Arg.(value & pos 0 string "-" & info [] ~doc ~docv:"FILE")
663663+ Arg.(value & pos 0 filepath "-" & info [] ~doc ~docv:"FILE")
664664665665let cmd =
666666 let doc = "The tool synopsis is TODO" in
···696696let flag = Arg.(value & flag & info ["flag"] ~doc:"The flag")
697697let infile =
698698 let doc = "$(docv) is the input file. Use $(b,-) for $(b,stdin)." in
699699- Arg.(value & pos 0 file "-" & info [] ~doc ~docv:"FILE")
699699+ Arg.(value & pos 0 filepath "-" & info [] ~doc ~docv:"FILE")
700700701701let hey_cmd =
702702 let doc = "The hey command synopsis is TODO" in
+1-1
vendor/opam/cmdliner/test/blueprint_cmds.ml
···1212let flag = Arg.(value & flag & info ["flag"] ~doc:"The flag")
1313let infile =
1414 let doc = "$(docv) is the input file. Use $(b,-) for $(b,stdin)." in
1515- Arg.(value & pos 0 file "-" & info [] ~doc ~docv:"FILE")
1515+ Arg.(value & pos 0 filepath "-" & info [] ~doc ~docv:"FILE")
16161717let hey_cmd =
1818 let doc = "The hey command synopsis is TODO" in