diff options
author | Daniel Silverstone <dsilvers+gitlab@digital-scurf.org> | 2020-11-16 09:20:01 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers+gitlab@digital-scurf.org> | 2020-11-16 09:20:01 +0000 |
commit | aab14ee3e4fb9eb48d3b1fb090703622b52db09f (patch) | |
tree | 1875c05df3eb6aef96fd4c43746f617da4674b0c /jt.md | |
parent | f47db1bd16c0e7c7d4f97e5a135b5034f059e85f (diff) | |
parent | 471fad9ef42b6176be083eb876dd4fbe85ecd1c1 (diff) | |
download | jt2-aab14ee3e4fb9eb48d3b1fb090703622b52db09f.tar.gz |
Merge branch 'edit' into 'master'
Edit
Closes #4
See merge request larswirzenius/jt!5
Diffstat (limited to 'jt.md')
-rw-r--r-- | jt.md | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -55,7 +55,7 @@ then command fails ~~~ -## Create a new draft and publish it +## Create a new draft, edit it, then publish it Verify that we can create a new draft entry for the journal. @@ -67,19 +67,27 @@ and there are no journal entries in jrnl when I invoke jt new "Abracadabra" --editor=none --dirname=jrnl then command is successful -then there is one draft in jrnl +and there is one draft in jrnl and draft 0 in jrnl contains "Abracadabra" -when I edit draft 0 in jrnl to also contain "Behold!" -and I invoke jt finish --dirname=jrnl +given an executable script append.sh +when I invoke jt edit --editor=./append.sh --dirname=jrnl then command is successful -then there is one journal entry in jrnl, at FILE +and draft 0 in jrnl contains "Open sesame!" + +when I invoke jt finish --dirname=jrnl +then command is successful +and there is one journal entry in jrnl, at FILE and file <FILE> contains "Abracadabra" -and file <FILE> contains "Behold!" +and file <FILE> contains "Open sesame!" and there are no drafts in jrnl ~~~ - +~~~{#append.sh .file .numberLines} +#!/bin/sh +set -eux +echo "Open sesame!" >> "$1" +~~~ --- title: "jt—a journalling tool" |