From d7aa9952d87d3de6649d04f538cc2f6bd489378b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 31 May 2021 09:31:29 +0530 Subject: [PATCH] Fix a regression that caused using the ``title`` command in session files to stop working Fixes #3676 --- docs/changelog.rst | 3 +++ docs/index.rst | 3 +-- kitty/session.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index a7eb8da4b..f18762ab8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -73,6 +73,9 @@ To update |kitty|, :doc:`follow the instructions `. - Tab bar: Use a lower contrast color for tab separators (:pull:`3666`) +- Fix a regression that caused using the ``title`` command in session files + to stop working (:iss:`3676`) + 0.20.3 [2021-05-06] ---------------------- diff --git a/docs/index.rst b/docs/index.rst index d4b174a93..ba682c9df 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -221,8 +221,7 @@ For example: # vim in it launch --env FOO=BAR vim # Set the title for the next window - title Chat with x - launch irssi --profile x + launch --title "Chat with x" irssi --profile x # Create a new tab (the part after new_tab is the optional tab # name which will be displayed in the tab bar, if omitted, the diff --git a/kitty/session.py b/kitty/session.py index 17bc84ff6..d19b30587 100644 --- a/kitty/session.py +++ b/kitty/session.py @@ -68,6 +68,8 @@ class Session: if self.default_watchers: spec.opts.watcher = list(spec.opts.watcher) + self.default_watchers t = self.tabs[-1] + if t.next_title and not spec.opts.window_title: + spec.opts.window_title = t.next_title spec.opts.cwd = spec.opts.cwd or t.cwd t.windows.append(spec) t.next_title = None