aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-edit
blob: cf3fc437b47c5d4d83942b0ed9f91056eb182ae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
# Usage: recit edit
# Summary: Open DB in $EDITOR

set -e

# shellcheck source=/dev/null
source lib/loader

recfile=$(load_recit)

if [[ -z ${EDITOR+x} ]]; then
  echo "$EDITOR is not defined please pass a message"
  exit 1
fi

command $EDITOR "$recfile"