aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-recsel-projects
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlibexec/recit-recsel-projects14
1 files changed, 14 insertions, 0 deletions
diff --git a/libexec/recit-recsel-projects b/libexec/recit-recsel-projects
new file mode 100755
index 0000000..f7778e9
--- /dev/null
+++ b/libexec/recit-recsel-projects
@@ -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 Project "${recfile}" | recfmt -f share/recit/templates/projects.templ)
+else
+ out=$(recsel -t Project "${recfile}" -e "$1" | recfmt -f share/recit/templates/projects.templ)
+fi
+echo -e "$out"