From a587610fd11dcbfe9073e33a456f62571673b95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 6 Feb 2024 20:54:50 -0300 Subject: [PATCH] scripts: fix wl-copy-file path handling --- scripts/wl-copy-file | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/wl-copy-file b/scripts/wl-copy-file index 05ffe06..95a4aea 100644 --- a/scripts/wl-copy-file +++ b/scripts/wl-copy-file @@ -10,12 +10,13 @@ if test (count $argv) != 1 end set -a file (realpath $argv[1]) +set -a url (string escape --style=url "$file") set -e argv[1] if test -d "$file" die 1 "Cannot copy directories" >&2 else if test -f "$file" - wl-copy $argv -t text/uri-list "file:///$file" + wl-copy $argv -t text/uri-list "file:///$url" else die 2 "No file found" >&2 end