3 # shellcheck disable=SC2155
4 local OK
=$
(check_noteID
"$NOTE")
6 echo "invalid note \"$NOTE\""
7 echo "Use the note ID that you can fetch after listing your notes"
11 # shellcheck disable=SC2016,SC2086
12 TITLE
=$
($JQ --arg i
$OK '.notes[] | select(.id == $i) | .title' $DB)
13 # shellcheck disable=SC2016,SC2086
14 FILE
=$
($JQ -r --arg i
$OK '.notes[] | select(.id == $i) | .file' $DB)
16 echo "editing note $TITLE"
17 # shellcheck disable=SC2086,SC2091
18 $
(${TERMINAL} ${TERM_OPTS} ${EDITOR} ${NOTESDIR}/${FILE})