aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-edit
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-07-14 03:40:24 +0000
committerJulio Capote <jcapote@gmail.com>2022-07-14 03:40:24 +0000
commit891f946e86f8a0911f67983d52fccacc9f8ebbad (patch)
tree36b032deb891f4adf5c047b255eb0ca6da275fef /libexec/recit-edit
downloadrecit-891f946e86f8a0911f67983d52fccacc9f8ebbad.tar.gz
initial
Diffstat (limited to 'libexec/recit-edit')
-rwxr-xr-xlibexec/recit-edit16
1 files changed, 16 insertions, 0 deletions
diff --git a/libexec/recit-edit b/libexec/recit-edit
new file mode 100755
index 0000000..f105bdc
--- /dev/null
+++ b/libexec/recit-edit
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+# Usage: recit edit
+
+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" \ No newline at end of file