#!/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"