Module Topkg.Cmd
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.
Command line fragments
val v : string -> t
v cmd
is a new command line (or command line fragment) whose first argument iscmd
.
val empty : t
empty
is an empty command line.
val is_empty : t -> bool
is_empty l
istrue
iffl
is empty.
val p : fpath -> string
p
is(fun f -> f)
.
Predicates and comparison
Conversions and pretty printing
val to_list : t -> string list
to_list l
isl
as a list of strings.
val of_list : ?slip:string -> string list -> t
of_list ?slip l
is a command line from the list of argumentsl
. Ifslip
is specified it is added on the command line before each element ofl
.
val dump : Stdlib.Format.formatter -> t -> unit
dump ppf cmd
formats an unspecified representation ofcmd
onppf
.