feat(file-manager): sync the working directory by default

The panel and the shell now share their directory out of the box; whoever wants
the previous independence sets sync_cwd no. The request is only written once the
shell has published its directory, since that file is what proves its
integration hook will read the request: a shell without shell integration still
gets the cd typed into the terminal instead of losing the change.
This commit is contained in:
BlackAngelTV committed 2026-11-11 08:35:19 +01:00
1 parent 1b330bcf81
commit e7e4e849eb
7 files changed
+61 -16

No files matched your search

+3 -2
View File
@@ -51,7 +51,7 @@ agr('shell', 'Shell synchronisation')
opt(
'sync_cwd',
'no',
'yes',
option_type='to_bool',
long_text="""
Keep the shell's working directory and the panel in step. A :code:`cd` in the
@@ -62,7 +62,8 @@ The exchange goes through two small files in the session directory kitty
exports as :envvar:`KITTY_CWD_SYNC_DIR`, so nothing is typed into the shell:
the command never lands in the history and a half typed multi-line command is
left untouched. Bash, zsh and fish are supported by their kitty shell
integration; other shells keep the current behaviour.
integration; other shells keep the current behaviour. Set :code:`sync_cwd no`
to keep the two directories independent.
""",
)