aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/loader12
-rwxr-xr-xlibexec/recit-add-entry5
-rwxr-xr-xlibexec/recit-add-project5
-rwxr-xr-xlibexec/recit-edit5
-rwxr-xr-xlibexec/recit-edit-entry5
-rwxr-xr-xlibexec/recit-entries5
-rwxr-xr-xlibexec/recit-recsel-entries9
-rwxr-xr-xlibexec/recit-recsel-projects9
8 files changed, 10 insertions, 45 deletions
diff --git a/lib/loader b/lib/loader
deleted file mode 100644
index 9b01d2a..0000000
--- a/lib/loader
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-function load_recit {
- local recfile_location
- if [[ -f "$HOME/.recit.location" ]]; then
- recfile_location=$(cat "$HOME/.recit.location")
- else
- echo "$HOME/.recit.location not found"
- exit 1
- fi
- echo "$recfile_location"
-} \ No newline at end of file
diff --git a/libexec/recit-add-entry b/libexec/recit-add-entry
index 93590e1..a41ae6c 100755
--- a/libexec/recit-add-entry
+++ b/libexec/recit-add-entry
@@ -4,10 +4,7 @@
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
notes=""
query_time=""
diff --git a/libexec/recit-add-project b/libexec/recit-add-project
index 2f30607..cd0dd51 100755
--- a/libexec/recit-add-project
+++ b/libexec/recit-add-project
@@ -3,10 +3,7 @@
# Summary: Add Project
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
name=""
while getopts "n:" options; do
diff --git a/libexec/recit-edit b/libexec/recit-edit
index cf3fc43..7431e64 100755
--- a/libexec/recit-edit
+++ b/libexec/recit-edit
@@ -4,10 +4,7 @@
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
if [[ -z ${EDITOR+x} ]]; then
echo "$EDITOR is not defined please pass a message"
diff --git a/libexec/recit-edit-entry b/libexec/recit-edit-entry
index 47ca072..9254753 100755
--- a/libexec/recit-edit-entry
+++ b/libexec/recit-edit-entry
@@ -4,10 +4,7 @@
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
uuid=$1
diff --git a/libexec/recit-entries b/libexec/recit-entries
index 7fcf438..1ba63b1 100755
--- a/libexec/recit-entries
+++ b/libexec/recit-entries
@@ -3,11 +3,6 @@
# Summary: Display entries, optionally for a project and/or a certain time
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
-
project=""
query_time=""
diff --git a/libexec/recit-recsel-entries b/libexec/recit-recsel-entries
index 5b6070a..f2ca2f9 100755
--- a/libexec/recit-recsel-entries
+++ b/libexec/recit-recsel-entries
@@ -1,14 +1,11 @@
#!/usr/bin/env bash
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
if [[ "$1" = "" ]]; then
- out=$(recsel -t Entry "${recfile}" | recfmt -f share/recit/templates/entries.templ)
+ 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)
+ out=$(recsel -t Entry "$recfile" -e "$1" | recfmt -f share/recit/templates/entries.templ)
fi
echo -e "$out"
diff --git a/libexec/recit-recsel-projects b/libexec/recit-recsel-projects
index f7778e9..017e3e4 100755
--- a/libexec/recit-recsel-projects
+++ b/libexec/recit-recsel-projects
@@ -1,14 +1,11 @@
#!/usr/bin/env bash
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
if [[ "$1" = "" ]]; then
- out=$(recsel -t Project "${recfile}" | recfmt -f share/recit/templates/projects.templ)
+ 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)
+ out=$(recsel -t Project "$recfile" -e "$1" | recfmt -f share/recit/templates/projects.templ)
fi
echo -e "$out"