dotfiles/home/private_dot_config/zsh/functions/envsubst

16 lines
353 B
Text
Raw Normal View History

2023-02-17 09:26:31 -06:00
##? envsubst - fall-back wrapper in the event the envsubst command does not exist.
# function envsubst {
if (( ! $+commands[envsubst] )); then
function envsubst {
command envsubst "$@"
}
else
function envsubst {
python -c 'import os,sys;[sys.stdout.write(os.path.expandvars(l)) for l in sys.stdin]'
}
fi
# }
# vim: ft=zsh sw=2 ts=2 et