From b4790896194a766002a67b7d0ccb4e1c6181fe5f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 Sep 2024 14:50:15 +0530 Subject: [PATCH] Fix a regression in the previous release that broke use of the cd command in session files Fixes #7829 --- docs/changelog.rst | 5 +++++ kitty/session.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index dfe71a933..3514416a7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -74,6 +74,11 @@ consumption to do the same tasks. Detailed list of changes ------------------------------------- +0.36.3 [future] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Fix a regression in the previous release that broke use of the ``cd`` command in session files (:iss:`7829`) + 0.36.2 [2024-09-06] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/session.py b/kitty/session.py index 1cf7180f2..1e98478b6 100644 --- a/kitty/session.py +++ b/kitty/session.py @@ -103,7 +103,7 @@ def set_layout(self, val: str) -> None: def add_window(self, cmd: Union[None, str, list[str]], expand: Callable[[str], str] = lambda x: x) -> None: from .launch import parse_launch_args needs_expandvars = False - if isinstance(cmd, str): + if isinstance(cmd, str) and cmd: needs_expandvars = True cmd = list(shlex_split(cmd)) spec = parse_launch_args(cmd)