Command line values specify the command line arguments given to tool spawns. Depending on the context this may represent either only tool arguments or the full command specification with the tool to spawn as the first argument.
A command line tool is represented by a file path according to the POSIX convention for exec(3):
If it is made of a single segment, for example Fpath.v "ocaml", it represents a program name to be looked up via a search procedure; for example in the PATH environment variable.
If it is a file path with multiple segments (POSIX would say if they contain a slash character) the program is the file itself.
Note. For portability one should not use the .exe suffix on Windows on tools. This should be handled transparently by tool_search procedures.
These are functions that resolve and set the get_tool argument of commands to a concrete program executable. Or return an error message if the tool cannot be resolved. See Tool search for implementations.
of_string s tokenizes s into a command line. The tokens are recognized according to the token production of the following grammar which should be mostly be compatible with POSIX shell tokenization.
qchar are substitued by the byte they escape except for '\n' which removes the backslash and newline from the byte stream. squoted and dquoted represent the bytes they enclose.
Stamps are not useful unless you are interested in memoizing tool invocations. A command stamp represents the part of the command line that influences a tool's output. By default arguments are part of the stamp however they can be selectively Cmd.unstamped to remove them from the stamp.
Unstamped arguments have no special semantics. As far as the command line is concerned they simply indicate that the argument value itself does not influence the outputs of the tool. Unstamped arguments do not appear in the command line stamp which can be used as a key to memoize tool spawns.
A typical example of unstamped arguments are file paths to inputs: it's often the file contents not the actual file path that determines the tool output; beware though that some tool use both the file path contents and the actual file path in their outputs (typically compilers which track source locations). See examples.
unstamp cmd indicates that arguments cmd do not influence the tool's invocation outputs. These arguments are omitted from the command line's stamp, see Stamps for more details and examples.