{"record":{"id":"06336845da6ba05a","repo":"remix-run/remix","slug":"unknown-completion-shell-shell","errorCode":null,"errorMessage":"Unknown completion shell: ${shell}","messagePattern":"Unknown completion shell: (.+?)","errorType":"exception","errorClass":"UsageError","httpStatus":null,"severity":"error","filePath":"packages/cli/src/lib/commands/completion.ts","lineNumber":39,"sourceCode":"    return 0\n  }\n\n  if (argv[0] === '--') {\n    return runCompletionPlumbing(argv.slice(1))\n  }\n\n  if (argv.includes('-h') || argv.includes('--help')) {\n    process.stdout.write(getCompletionCommandHelpText())\n    return 0\n  }\n\n  let [shell, ...rest] = argv\n\n  try {\n    parseArgs(rest, {}, { maxPositionals: 0 })\n\n    if (!isCompletionShell(shell)) {\n      throw unknownCompletionShell(shell)\n    }\n\n    process.stdout.write(getCompletionScript())\n    return 0\n  } catch (error) {\n    process.stderr.write(\n      renderCliError(toCliError(error), {\n        helpText: getCompletionCommandHelpText(process.stderr),\n      }),\n    )\n    return 1\n  }\n}\n\nexport function getCompletionCommandHelpText(target: NodeJS.WriteStream = process.stdout): string {\n  return formatHelpText(\n    {\n      description: 'Print a shell completion script for Remix.',","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/remix-run/remix/blob/9696913134be3a4423513d2775f7b31d6917c049/packages/cli/src/lib/commands/completion.ts#L21-L57","documentation":"The completion command accepts a single shell argument and currently only recognizes one supported shell; any other value (or none, since undefined fails the guard) is rejected as an unknown completion shell.","triggerScenarios":"runCompletionCommand finds shell is not a value accepted by isCompletionShell — e.g. remix completion zsh or remix completion fish when only bash is supported, or remix completion with no argument.","commonSituations":"Users on zsh/fish following generic clap-style docs; automated shell setup snippets that pass $SHELL basename; missing argument in scripted dotfiles.","solutions":["Pass the supported shell name shown by remix completion --help (e.g. remix completion bash)","Update the CLI to a version that supports your shell if one exists","If your shell is unsupported, wire manual completion from the emitted script or skip it"],"exampleFix":"# before\n$ remix completion zsh\n\n# after\n$ remix completion bash","handlingStrategy":"type-guard","validationCode":"const SUPPORTED_SHELLS = new Set(['bash']) // match isCompletionShell\n\nfunction shellIsSupported(shell?: string): boolean {\n  return shell != null && SUPPORTED_SHELLS.has(shell)\n}","typeGuard":"function isCompletionShell(shell: string | undefined): shell is 'bash' {\n  return shell === 'bash'\n}","tryCatchPattern":"try {\n  runCompletionCommand(argv)\n} catch (error) {\n  if (/Unknown completion shell/.test(error.message)) printSupportedShells()\n  else throw error\n}","preventionTips":["Check remix completion --help before wiring shell rc files","Don't blindly pass $(basename $SHELL) to the command","Re-run the completion setup step after CLI upgrades"],"tags":["cli","completion","shell"],"backgroundTag":"unsupported-shell-completion","analyzedSha":"9696913134be3a4423513d2775f7b31d6917c049","analyzedAt":"2026-08-27T19:55:01.024Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}