aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-recsel-entries
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlibexec/recit-recsel-entries14
1 files changed, 14 insertions, 0 deletions
diff --git a/libexec/recit-recsel-entries b/libexec/recit-recsel-entries
new file mode 100755
index 0000000..5b6070a
--- /dev/null
+++ b/libexec/recit-recsel-entries
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+set -e
+
+# shellcheck source=/dev/null
+source lib/loader
+
+recfile=$(load_recit)
+
+if [[ "$1" = "" ]]; then
+ out=$(recsel -t Entry "${recfile}" | recfmt -f share/recit/templates/entries.templ)
+else
+ out=$(recsel -t Entry "${recfile}" -e "$1" | recfmt -f share/recit/templates/entries.templ)
+fi
+echo -e "$out"