π File detail
utils/shell/resolveDefaultShell.ts
π§© .tsπ 15 linesπΎ 496 bytesπ text
β Back to All Filesπ― Use case
This file lives under βutils/β, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, β¦). On the API surface it exposes resolveDefaultShell β mainly functions, hooks, or classes. It composes internal code from settings (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { getInitialSettings } from '../settings/settings.js' /** * Resolve the default shell for input-box `!` commands. *
π€ Exports (heuristic)
resolveDefaultShell
π₯οΈ Source preview
import { getInitialSettings } from '../settings/settings.js'
/**
* Resolve the default shell for input-box `!` commands.
*
* Resolution order (docs/design/ps-shell-selection.md Β§4.2):
* settings.defaultShell β 'bash'
*
* Platform default is 'bash' everywhere β we do NOT auto-flip Windows to
* PowerShell (would break existing Windows users with bash hooks).
*/
export function resolveDefaultShell(): 'bash' | 'powershell' {
return getInitialSettings().defaultShell ?? 'bash'
}