πŸ“„ 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'
}