mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Fix the send_text action not working in URL handlers
send_text keeps its args as byte string, so variable expansion was not working. Fixes #3081
This commit is contained in:
@@ -39,6 +39,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- Dont ignore :option:`--title` when using a session file that defines no
|
||||
windows (:iss:`3055`)
|
||||
|
||||
- Fix the send_text action not working in URL handlers (:iss:`3081`)
|
||||
|
||||
|
||||
0.19.1 [2020-10-06]
|
||||
-------------------
|
||||
|
||||
@@ -158,8 +158,14 @@ def actions_for_url_from_list(url: str, actions: Iterable[OpenAction]) -> Genera
|
||||
}
|
||||
|
||||
def expand(x: Any) -> Any:
|
||||
as_bytes = isinstance(x, bytes)
|
||||
if as_bytes:
|
||||
x = x.decode('utf-8')
|
||||
if isinstance(x, str):
|
||||
return expandvars(x, env, fallback_to_os_env=False)
|
||||
ans = expandvars(x, env, fallback_to_os_env=False)
|
||||
if as_bytes:
|
||||
return ans.encode('utf-8')
|
||||
return ans
|
||||
return x
|
||||
|
||||
for action in actions:
|
||||
|
||||
Reference in New Issue
Block a user