From 48d6a9cdb9e9b0d72104ad2eb5214376ed621c19 Mon Sep 17 00:00:00 2001 From: dweller Date: Mon, 18 Mar 2024 05:08:39 +0200 Subject: shellcheck and fix handling of URI encoded file paths --- xcopy | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'xcopy') 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 # # 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 -- cgit v1.2.3