Restrict custom launch actions to be prefixed with kitty:///launch/

Preserve the kitty URL scheme for further use.
This commit is contained in:
pagedown
2022-02-05 13:23:41 +08:00
parent ffbc533565
commit ddb9b67de3

View File

@@ -259,6 +259,9 @@ def actions_for_url(url: str, actions_spec: Optional[str] = None) -> Iterator[Ke
def actions_for_launch(url: str) -> Iterator[KeyAction]:
# Custom launch actions using kitty URL scheme needs to be prefixed with `kitty:///launch/`
if url.startswith('kitty://') and not url.startswith('kitty:///launch/'):
return
found = False
for action in actions_for_url_from_list(url, load_launch_actions()):
found = True