Fission-AI/OpenSpec · error
Unsupported shell
Error message
Unsupported shell: ${shell} What it means
Exhaustive switch default in the completion generator factory: the shell value fell through all known cases (zsh, bash, fish, powershell). It signals a caller passing an unvalidated or stale SupportedShell value, or a new shell not yet added to the switch.
Solutions
- Pass one of the supported shells: zsh, bash, fish, or powershell
- Validate or normalize user input before calling createGenerator
- If adding a new shell, implement its generator and add a case to the switch
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/completions/factory.ts:73 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/29b091caec9f58c0.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/completions/factory.ts:73
/**
* Create a completion generator for the specified shell
*
* @param shell - The target shell
* @returns CompletionGenerator instance
* @throws Error if shell is not supported
*/
static createGenerator(shell: SupportedShell): CompletionGenerator {
switch (shell) {
case 'zsh':
return new ZshGenerator();
case 'bash':
return new BashGenerator();
case 'fish':
return new FishGenerator();
case 'powershell':
return new PowerShellGenerator();
default:
throw new Error(`Unsupported shell: ${shell}`);
}
}
/**
* Create a completion installer for the specified shell
*
* @param shell - The target shell
* @returns CompletionInstaller instance
* @throws Error if shell is not supported
*/
static createInstaller(shell: SupportedShell): CompletionInstaller {
switch (shell) {
case 'zsh':
return new ZshInstaller();
case 'bash':
return new BashInstaller();
case 'fish':
return new FishInstaller();View on GitHub (pinned to 6926ccb18a)