Skip to main content
Strings in Errand support template interpolation with ${}. Use it to embed variables, computed values, function calls, or any expression inside a string.

Syntax

You can mix literal text and multiple interpolations in a single string:

In task commands

In computed expressions

Function calls in interpolation

Any function call can appear inside ${}:

Escaping

To include a literal ${ in a string, escape the dollar sign with an extra $:
This outputs ${HOME} to the shell, which the shell then expands. Without escaping, Errand would try to evaluate HOME as an expression.

Conditional expressions

Ternary-style conditionals work inside interpolations: