aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-10-17 14:55:16 +0100
committerMatthew Lemon <y@yulqen.org>2023-10-17 14:55:26 +0100
commitf368a4e3d126a2f5910ec95ca308836f068110db (patch)
tree8f57631c6b54d2d4f1c05f27e026cd1f17724149
parenta094ae898cfec5af45e78a5d5da036bd4b943e5e (diff)
Seems to fix a bug or change in xclip
-rwxr-xr-xtjclip-alternate.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tjclip-alternate.sh b/tjclip-alternate.sh
index cb3483a..8346e0c 100755
--- a/tjclip-alternate.sh
+++ b/tjclip-alternate.sh
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
# this script replaces tjclip fish function which relied on _tj.
+set -euxo pipefail
# Our target file
TODAY_JOURNAL=~/Documents/Notes/journal/home/$(date +\%Y-\%m-\%d).md
-URL="$(xclip -o clipboard clipboard)"
+URL="$(xclip -select clipboard -o)"
# Test whether it already exisits or not
if [[ -a $TODAY_JOURNAL ]]