设置 › 终端新增「本地终端」:指定 Shell;Windows 默认改用 PowerShell

本地终端运行的程序可以写路径或命令,带参数;输入框右端的下拉列出装了的常用 shell
(zsh、bash、sh、fish、nu、pwsh,从 /etc/shells、PATH 和 Homebrew 目录找),旁边
「选择文件…」用系统的文件选择框。留空是自动检测,新开和重新启动的本地终端生效。
只写一个 shell 时和默认一样按登录 shell 启动,带参数或不是 shell 的照写执行。

Windows 的默认 shell 原来是 cmd.exe,现在先用 PowerShell 7,其次 Windows PowerShell,
都没有才用 cmd.exe。

工作区改为每次打开、重启本地终端时向 LocalTerminalTransportProvider 要 factory,
UI 测试注入的 FixedLocalTerminalTransportProvider 记下每次要的 shell。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
XuzandClaude Opus 5.5 committed 2026-10-11 19:44:25 +08:00
1 parent 9799f88ade
commit cd489a5fc2
24 files changed
+1172 -55

No files matched your search

+2
View File
@@ -28,6 +28,7 @@ on:
- "src/sftp/sync.rs"
- "src/credential/credential_dialog.rs"
- "src/settings/settings_panel.rs"
- "src/terminal/local_shell.rs"
- "src/app/shortcuts.rs"
- "src/workspace/window_state.rs"
- "src/testing.rs"
@@ -57,4 +58,5 @@ jobs:
- run: "cargo test --lib cli::"
- run: "cargo test --lib update::"
- run: "cargo test --lib sftp::tests::local_listing"
- run: "cargo test --lib terminal::local_shell"
- run: cargo test --test cli_bin