From a834f221f1e289fc9da47a3c8eb97e013537e413 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 15 Mar 2022 21:07:36 +0530 Subject: [PATCH] Unquote paths from file:// URLs The original iTerm spec for this says the urls are supposed to be percent escaped --- kitty/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/utils.py b/kitty/utils.py index b6fc0d7ee..016950b06 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -942,6 +942,6 @@ def path_from_osc7_url(url: str) -> str: if url.startswith('kitty-shell-cwd://'): return '/' + url.split('/', 3)[-1] if url.startswith('file://'): - from urllib.parse import urlparse - return urlparse(url).path + from urllib.parse import urlparse, unquote + return unquote(urlparse(url).path) return ''