Configures various engine operating modes.
engine mode
can be invoked without argument to retrieve the current settings for all supported modes. The command can also be invoked with one or more mode specification to set these modes (see modespec argument below).Parameters:
- modespec
- A mode specification string. If
mode
string is prefixed with a dash (-
), it is turned off. If mode is prefixed with a plus (+
) or not prefixed, it is turned on. Supported modespec are:
overwrite
- when turned on, newly generated files will overwrite existing files without warning. When turned off, the engine will stop with an error if a newly generated file would overwrite an existing file.
overwrite
is by default off.move-if-change
- when turned on, an existing file with the same content as a newly generated file will not be modified (preserving the last modification timestamp). When off, files are systematically updated.
move-if-change
is on by default.merge-if-change
- when turned on, existing destination files will be merged with new content by the engine, instead of being overwritten (see engine merge-tool).
merge-if-change
is off by default.debug
- when on, this mode preserves temporary files and tcl programs generated in the temporary directory. Useful only for debugging the template.
Returns:
When called without arguments, the command returs the current configuration of all engine modes.Example:
engine mode -overwrite +move-if-change