aboutsummaryrefslogtreecommitdiffstats
path: root/tjclip-alternate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tjclip-alternate.sh')
-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 ]]