# test reading args
chezmoi execute-template '{{ "arg-template" }}'
stdout arg-template

[short] stop

# test reading from stdin
stdin golden/stdin.tmpl
chezmoi execute-template
stdout stdin-template

# test partial templates work
chezmoi execute-template '{{ template "partial" }}'
stdout 'hello world'

# test --init --promptString
chezmoi execute-template --init --promptString email=you@example.com '{{ promptString "email" }}'
stdout 'you@example.com'

-- golden/stdin.tmpl --
{{ "stdin-template" }}
-- home/user/.config/chezmoi/chezmoi.toml --
[data.last]
  config = "chezmoi.toml"
  global = "chezmoi.toml"
-- home/user/.local/share/chezmoi/.chezmoitemplates/partial --
{{ cat "hello" "world" }}
