Project xenv


3.1  —  2022-04-01
* New feature-control options

** -Wno-escape

The '-Wno-escape' option disables special handling of backslash in
free context.  For example, with this option in effect, the variable
$HOME will be expanded in the following text

  The \$HOME always expands

The '-Wno-escape' option does not affect expansion of default values
in variable substitutions.  For example, in the text below, the backslash
prevents the

  ${HOME:+"The variable \$HOME is set"}

** -Wminimal

This option disables all other features and enforces '$ENV' as environment
meta-variable.  In terms of xenv options, it is a shortcut for:

    -Wno-command -Wno-comment -Wno-directive -Wno-quote \
    -Wno-escape -e ENV

Xenv is a text preprocessor. It reads input from files (or the standard input, if none are supplied) and prints it on the standard output, replacing references to environment variables with their actual values. Variables are referenced using POSIX-compatible shell syntax: $NAME, ${NAME}, ${NAME:-word}, ${NAME+=word}, ${NAME:=word}, ${NAME:?word}. A special ternary construct is provided: ${NAME:|word1|word2}, which substitutes the expansion of word1 if NAME is set and the expansion of word2 otherwise. Conditional preprocessor statements are provided, that allow parts of input to be excluded depending on whether a variable is set.