module Cmd:sig..end
Command lines.
Both command lines and command line fragments using the same are represented with the same type.
When a command line is run, the first
element of the line defines the program name and each other
element is an argument that is passed as is in the
program's argv array: no shell interpretation or any form of
argument quoting and/or concatenation occurs.
type t
The type for command line fragments.
val v : string -> tv cmd is a new command line (or command line fragment)
whose first argument is cmd.
val empty : tempty is an empty command line.
val is_empty : t -> boolis_empty l is true iff l is empty.
val (%) : t -> string -> tl % arg adds arg to the command line l.
val (%%) : t -> t -> tl %% frag appends the line fragment frag to l.
val add_arg : t -> string -> tadd_arg l arg is l % arg.
val add_args : t -> t -> tadd_args l frag is l %% frag.
val on : bool -> t -> ton bool line is line if bool is true and Topkg.Cmd.empty
otherwise.
val p : Topkg.fpath -> stringp is (fun f -> f).
val equal : t -> t -> boolequal l l' is true iff l and l' are litterally equal.
val compare : t -> t -> intcompare l l' is a total order on command lines.
val to_list : t -> string listto_list l is l as a list of strings.
val of_list : ?slip:string -> string list -> tof_list ?slip l is a command line from the list of arguments
l. If slip is specified it is added on the command line
before each element of l.
val dump : Stdlib.Format.formatter -> t -> unitdump ppf cmd formats an unspecified representation of cmd on
ppf.