let cmdliner_term
?(doc="URI of the host (e.g. ssh://user@example.com:42/tmp/ketrewplayground).") how =
let open Cmdliner in
Term.(
pure (fun s -> parse s)
$ begin match how with
| `Flag (flags) ->
Arg.(value & opt string "/tmp/" & info flags ~doc ~docv:"URI")
| `Required p ->
Arg.(required & pos p (some string) None & info [] ~doc ~docv:"URI")
end
)