/ utils / shell / resolveDefaultShell.ts
resolveDefaultShell.ts
 1  import { getInitialSettings } from '../settings/settings.js'
 2  
 3  /**
 4   * Resolve the default shell for input-box `!` commands.
 5   *
 6   * Resolution order (docs/design/ps-shell-selection.md §4.2):
 7   *   settings.defaultShell → 'bash'
 8   *
 9   * Platform default is 'bash' everywhere — we do NOT auto-flip Windows to
10   * PowerShell (would break existing Windows users with bash hooks).
11   */
12  export function resolveDefaultShell(): 'bash' | 'powershell' {
13    return getInitialSettings().defaultShell ?? 'bash'
14  }