Add support for executing a command on a file.

$file in the command string references the file name. The stdout of the
command will become the file's new contents. This is useful for doing
things that nimgen might not support, like using sed or grep or some
other command line tool.
This commit is contained in:
Joey Yakimowich-Payne 2018-06-16 15:33:47 +09:00
commit e371546d52
2 changed files with 11 additions and 1 deletions

View file

@ -143,6 +143,8 @@ The following keys apply to library source code (before processing) and generate
```search``` = search string providing context for following prepend/append/replace directives
```execute``` = execute a command on a file and store the output of the command as the new file contents. Ex: execute = "cat $file | grep 'static inline'"
```prepend``` = string value to prepend into file at beginning or before search
```append``` = string value to append into file at the end or after search