Fix a regression in the previous release that broke use of the cd command in session files

Fixes #7829
This commit is contained in:
Kovid Goyal 2024-09-06 14:50:15 +05:30
parent bfbffc3a7b
commit b479089619
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View file

@ -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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -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)