zk/tests/cmd-new-template.tesh

19 lines
433 B
Plaintext
Raw Normal View History

2022-01-10 13:28:14 +00:00
$ cd new
$ mkdir "a dir"
# Test Handlebars template variables.
$ echo "Piped content" | zk new --group handlebars --title "Note title" --date "January 2nd" --dry-run "a dir"
>id: {{match "[a-z0-9]{4}"}}
>title: Note title
>content: Piped content
>
>dir: a dir
>extra: {"key":"value","visibility":"public"}
>now: 02-01
>env: {{working-dir}}
>filename: note-title.md
>filename-stem: note-title
2>{{working-dir}}/a dir/note-title.md