add

fun add(v: CmdUtils.Var? = null, cmd: () -> String): CmdBuilder

Primary action that appends a command to the CmdBuilder.

Parameters

v

an optional exporting variable. If it is non-null, the results of cmd will be recorded to it. Otherwise it is null, then the cmd will be used verbatim.

cmd

lambda that constructs the command.