From be92cc87a412f13055b670015ad72d51c62c0603 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 Feb 2024 11:22:15 +0530 Subject: [PATCH] macOS: The command line args from macos-launch-services-cmdline are now prefixed to any args from open --args rather than overwriting them The purpose of the file is to provide default command line args when launching from GUI. Since macOS nowadays also allows command line args when launch via open, also respect them. Fixes #7135 --- docs/changelog.rst | 3 +++ kitty/main.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index de4d3f39d..ff4d4008c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -50,6 +50,9 @@ Detailed list of changes generating spurious release events even when report all keys as escape codes is not set (:iss:`7136`) +- macOS: The command line args from :file:`macos-launch-services-cmdline` are now + prefixed to any args from ``open --args`` rather than overwriting them (:iss:`7135`) + 0.32.2 [2024-02-12] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/main.py b/kitty/main.py index 5c6788d46..aa65064bf 100644 --- a/kitty/main.py +++ b/kitty/main.py @@ -363,7 +363,7 @@ def macos_cmdline(argv_args: List[str]) -> List[str]: ans = list(shlex_split(raw)) if ans and ans[0] == 'kitty': del ans[0] - return ans + return ans + argv_args def expand_listen_on(listen_on: str, from_config_file: bool) -> str: