aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-recsel-entries
blob: 5b6070ab320693f7740b6e28e0a4bfdc736fe433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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"