config: working-directory expands ~/ prefix

Fixes #11336

Introduce a proper WorkingDirectory tagged union type with home, inherit,
and path variants. The field is now an optional (?WorkingDirectory) where
null represents "use platform default" which is resolved during Config.finalize
to .inherit (CLI) or .home (desktop launcher).
This commit is contained in:
Mitchell Hashimoto
2026-03-10 14:11:35 -07:00
parent a4cc37db72
commit 04d5efc8eb
7 changed files with 182 additions and 27 deletions

View File

@@ -639,7 +639,7 @@ pub fn init(
.shell_integration = config.@"shell-integration",
.shell_integration_features = config.@"shell-integration-features",
.cursor_blink = config.@"cursor-style-blink",
.working_directory = config.@"working-directory",
.working_directory = if (config.@"working-directory") |wd| wd.value() else null,
.resources_dir = global_state.resources_dir.host(),
.term = config.term,
.rt_pre_exec_info = .init(config),