aboutsummaryrefslogtreecommitdiff
path: root/libexec/recit-edit-entry
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-09-09 02:16:21 +0000
committerJulio Capote <jcapote@gmail.com>2022-09-09 02:16:21 +0000
commit34067af321b78094f740ec2d5c8086f7d80d7615 (patch)
tree87250e937b1bb66f7d29d1c920137279cc270863 /libexec/recit-edit-entry
parentd79f13cbcc3fd07b483a9744e87f3e5f3e5860cc (diff)
downloadrecit-34067af321b78094f740ec2d5c8086f7d80d7615.tar.gz
allow stdin for edit-entry with -
Diffstat (limited to 'libexec/recit-edit-entry')
-rwxr-xr-xlibexec/recit-edit-entry7
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/recit-edit-entry b/libexec/recit-edit-entry
index 9254753..1ee3d4e 100755
--- a/libexec/recit-edit-entry
+++ b/libexec/recit-edit-entry
@@ -6,7 +6,12 @@ set -e
recfile=$(recit-file)
-uuid=$1
+uuid=""
+if [[ "$1" = "-" ]]; then
+ uuid=$(cat)
+else
+ uuid="$1"
+fi
notes=$(recsel -e "Id = '$uuid'" -t Entry -P Notes "${recfile}")
time=$(recsel -e "Id = '$uuid'" -t Entry -P Time "${recfile}")