summaryrefslogtreecommitdiff
path: root/xcopy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xxcopy7
1 files changed, 2 insertions, 5 deletions
diff --git a/xcopy b/xcopy
index 1795526..1511d51 100755
--- a/xcopy
+++ b/xcopy
@@ -1,18 +1,15 @@
-#!/bin/sh
+#!/bin/sh -e
#
# Copyright (C) 2023 dwlr <dweller@cabin.digital>
#
# BSD 3-Clause License (BSD-3-Clause)
# See LICENSE for details
-set -e
-
{
echo "" # TODO: why does it need a \n before the list?
-
for i in "$@"; do
- echo "file://$(realpath ${i})"
+ echo "file://$(realpath "$i")"
done
} | xclip -sel clipboard -i -r -t text/uri-list