Commits


Improve readme


Update readme Fixed program name in main header, improved and expanded some text, fixed some inacurate specification details, fixed a typo, and improved formatting.


Bump version to 1.0.1


Improve variable substitution efficiency If a value in the variables file contains multiple instances of the same variable, they will all be replaced in a single function call, eliminating the need to loop over the same block of code multiple times.


Remove a period from a comment header


Fix brace escaping in regexes The POSIX extended regular expression spec requires that the left brace character be escaped when it appears outside of an interval expression. The results are undefined if the brace is not escaped.[^1] The ERE spec permits right braces to be escaped, though this isn't required.[^2] But the standard ERE escaping rules are superseded in the POSIX awk specification. The awk spec does not specify a right brace escape sequence, so the meaning of an escaped right brace is undefined.[^3] We have a number of escaped right braces and one instance of a string variable containing unescaped left braces being passed to a function as a regex. These don't cause any problems in practice, but to ensure maximum portability and pedantry, we bring everything into strict compliance with the spec here. [^1]: POSIX.1-2024 XBD 9.4.3: <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#tag_09_04_03> [^2]: POSIX.1-2024 XBD 9.4.2: <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#tag_09_04_02> [^3]: POSIX.1-2024 awk: <https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html#tag_20_06_13_04>


Add version number


Add a note about regex metacharacter escaping


Rename command to "tpl"


Add header comment to script


Add license


Make a pedantic change to example text


Improve readme


Add test script


Improve handling of var references in vars file Previously, if a previously defined variable was used as a value in a variable assignment, it had to stand alone. This change allows variables to be freely intermixed with text and multiple variables to be used in a single assignment.


Add readme and example files


Allow vars to reference vars defined earlier The template variable syntax can be used when defining a variable to reference the value of a previously defined variable: foo = bar baz = {{ foo }}


Improve variable-matching regex


Make spaces in template vars optional Template variables can now have zero or more whitespace characters between the braces and the variable name.


Add script