Expand description
The shells installed on this machine, and which one a new local terminal runs: the default-shell setting (docs/specs/SPEC_DEFAULT_SHELL_SETTING_2026_10_13.md).
list: every shell found, with a name and version, for Settings.resolve_for_spawn: the shell a terminal starts with. The block’s ownterm:localshellpath, else the global setting, else the automatic choice (PowerShell 7, then Windows PowerShell, then Command Prompt on Windows;$SHELL, then/bin/bashelsewhere). A chosen shell that isn’t there falls back to the automatic one, so a stale setting never stops a terminal from opening.
Finding candidates is written over an injected environment and filesystem,
with Windows paths handled as strings, like posix_shell::resolve_windows,
so the order is tested on every host.
Structs§
- Spawn
Shell - The shell a new local terminal starts with.
Functions§
- automatic
- The automatic choice, as before the setting was honoured: PowerShell 7 on
PATH, else Windows PowerShell, else Command Prompt; elsewhere
$SHELL, else/bin/bash. - for_
block - The shell and extra arguments a block’s interactive terminal starts with:
resolve_for_spawnon the block’s and the globalterm:localshellpath, and the block’sterm:localshellopts, else the setting’s (appended after the shell-integration arguments). Logs a configured shell that wasn’t found. - list
- What Settings shows: the shells found, the automatic choice, and what a new
terminal starts with under
global_setting. Blocking: run it off the async runtime. - resolve_
for_ spawn - Which shell a terminal starts with: the block’s
term:localshellpath, then the global setting, thenautomatic. - with_
user_ opts - The shell’s arguments: the integration ones and the user’s
term:localshellopts. PowerShell’s integration ends-File <script>, and anything after-Filegoes to the script, so the user’s options go before it; elsewhere they follow (bash wants its long options,--rcfile, first).