Merge branch 'feat/cwd-sync'

Keep the file manager panel and the shell in the same directory in both
directions, through the shell integration instead of typing commands.
This commit is contained in:
BlackAngelTV committed 2026-11-12 07:32:09 +01:00
commit 13c49c89aa
13 files changed
+546 -10

No files matched your search

+11
View File
@@ -927,6 +927,17 @@ class Tab: # {{{
restored_scrollback: bytes = b'',
) -> Window:
"Create a new window. When dock is specified, the window is docked to dock_owner or to the tab if dock_owner is None."
# A special window opened over another one, or docked next to it, needs
# to know which shell it belongs to: the file manager uses it to find
# the session file where that shell publishes its working directory. A
# dock follows a window group, so its initial parent is the active
# window of the tab it is created in.
parent_window_id = overlay_for
if parent_window_id is None and dock is not None and (aw := self.active_window) is not None:
parent_window_id = aw.id
if parent_window_id is not None:
env = dict(env or {})
env['KITTY_SPECIAL_WINDOW_PARENT'] = str(parent_window_id)
cs = WindowCreationSpec(
use_shell=use_shell,
cmd=cmd,