pub fn expand_vars_with(
input: &str,
lookup: impl Fn(&str) -> Option<String>,
) -> StringExpand description
Expand $VAR, ${VAR}, ${VAR:-default} (the default when unset or
empty) and $$ (a literal $) in input, with the variables lookup
gives. A variable it does not give expands to nothing.