diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-11-14 16:28:21 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-11-16 11:11:02 +0200 |
commit | 471fad9ef42b6176be083eb876dd4fbe85ecd1c1 (patch) | |
tree | 1875c05df3eb6aef96fd4c43746f617da4674b0c /subplot/jt.yaml | |
parent | 04696e960745320dbec7b5b31713b5a280da3ad5 (diff) | |
download | jt2-471fad9ef42b6176be083eb876dd4fbe85ecd1c1.tar.gz |
feat: add "jt edit" to edit a draft with a chosen editor
Also, add some debugging log statements that were needed while making
this change.
Diffstat (limited to 'subplot/jt.yaml')
-rw-r--r-- | subplot/jt.yaml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/subplot/jt.yaml b/subplot/jt.yaml index 5ed6ed3..6d10a3a 100644 --- a/subplot/jt.yaml +++ b/subplot/jt.yaml @@ -1,3 +1,6 @@ +- given: "an executable script {filename}" + function: create_script + - when: I invoke jt init (?P<dirname>\S+) (?P<journalname>\S+) "(?P<title>.*)" regex: true function: run_jt_init @@ -11,6 +14,10 @@ - when: I invoke jt new "{title:text}" --editor=none --dirname={dirname} function: run_jt_new +- when: "I invoke jt edit --editor={editor} --dirname={dirname}" + regex: false + function: run_jt_edit + - when: I invoke jt finish --dirname={dirname} function: run_jt_finish @@ -30,7 +37,7 @@ - then: there is one draft in {dirname} function: journal_has_one_draft -- then: draft {draftno} in {dirname} contains "{pattern}" +- then: draft {draftno} in {dirname} contains "{pattern:text}" function: draft_contains_string - then: there are no journal entries in {dirname} @@ -39,5 +46,5 @@ - then: there is one journal entry in {dirname}, at {variable} function: journal_has_one_entry -- then: file <{variable}> contains "{pattern}" +- then: file <{variable}> contains "{pattern:text}" function: file_contains |