Open LunarLambda opened 8 months ago
I would also very much like this functionality: it's frustrating when I have to type cd
to switch to my home directory every time I open a new window.
Would you accept a PR that implements this? I would propose to add two new configuration variables:
Variable | Effect |
---|---|
new_window_cwd |
Initial working directory for new windows, if unset keeps the existing behavior. |
new_tab_cwd |
Initial working directory for new tab, if unset keeps the existing behavior. |
How does this sound?
Is your feature request related to a problem? Please describe. According to default_cwd there's no (straightforward, non-programmatic) way to opt out of the behaviour that any new terminals will try to use OSC 7/the current process leader's cwd. 9 out of 10 times I do not want that and immediately
cd
to my home dir since I use tabs for completely unrelated contexts and tasks and otherwise rely on shell jobs and my editor for multitasking within the same context.Describe the solution you'd like A simple boolean or string option to override the
default_cwd
behaviour for new panes/tabs to opt out of the OSC 7/process leader querying behaviour. I would like all new terminals to default to my home directory unless explicitly opened with--cwd
.Describe alternatives you've considered It's probably possible to override the default keybindings to always pass
--cwd wezterm.home_dir
but it's not immediately obvious how to do so, and I'm trying to keep my configuration as minimal and declarative as possible since the default keybindings are fine for me.