struct
include Ketrew_host
let ssh
?add_ssh_options
?playground
?port ?user ?name str =
let playground = Option.map ~f:Path.absolute_directory_exn playground in
ssh ?default_shell:None
?execution_timeout:None
?add_ssh_options
?playground
?port ?user ?name str
let parse = of_string
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
)
end