feat(templates): adds arbitrary shell execution and pda-getting

This commit is contained in:
Lewis Wynne 2026-02-12 23:28:19 +00:00
parent 2ca32769d5
commit f9ff2c0d62
8 changed files with 139 additions and 11 deletions

13
testdata/template-pda-ref.ct vendored Normal file
View file

@ -0,0 +1,13 @@
# pda function cross-references another key
$ pda set base https://example.com
$ fecho tpl1 {{ pda "base" }}/api
$ pda set endpoint@tplr < tpl1
$ pda get endpoint@tplr
https://example.com/api
# pda with substitution vars passed through
$ fecho tpl2 Hello, {{ default "World" .NAME }}
$ pda set greeting@tplr < tpl2
$ fecho tpl3 {{ pda "greeting@tplr" }}!
$ pda set shout@tplr < tpl3
$ pda get shout@tplr NAME=Alice
Hello, Alice!