{"record":{"id":"cfd6bb0d89c2b46e","repo":"go-task/task","slug":"unknown-shell-s","errorCode":null,"errorMessage":"unknown shell: %s","messagePattern":"unknown shell: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"completion.go","lineNumber":37,"sourceCode":"\n//go:embed completion/zsh/_task\nvar completionZsh string\n\nfunc Completion(completion string) (string, error) {\n\t// Get the file extension for the selected shell\n\tswitch completion {\n\tcase \"bash\":\n\t\treturn completionBash, nil\n\tcase \"fish\":\n\t\treturn completionFish, nil\n\tcase \"nu\", \"nushell\":\n\t\treturn completionNu, nil\n\tcase \"powershell\":\n\t\treturn completionPowershell, nil\n\tcase \"zsh\":\n\t\treturn completionZsh, nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unknown shell: %s\", completion)\n\t}\n}\n","sourceCodeStart":19,"sourceCodeEnd":40,"githubUrl":"https://github.com/go-task/task/blob/385e5ad92af02877b6d7cf9dcc963b5ed916e70a/completion.go#L19-L40","documentation":"The `task --completion <shell>` command only supports a fixed set of shells (bash, zsh, fish, powershell). Passing any other value returns this error from Completion. It is a simple argument-validation error listing no supported values in the message.","triggerScenarios":"Running `task --completion <value>` where <value> is not exactly one of the supported shell names handled by the switch in Completion.","commonSituations":"Typo like `--completion bash4`, using `sh`, `fish`-variant names or capitalized values (`Bash`), or copying an example from another tool (e.g. `--completion powershell-core`).","solutions":["Use one of the supported values: bash, zsh, fish, powershell (exact lowercase spelling)","Check `task --help` for the exact completion subcommand syntax for your installed version","For unsupported shells, generate the closest supported completion and adapt it manually"],"exampleFix":"# before\ntask --completion sh\n# after\ntask --completion bash","handlingStrategy":"validation","validationCode":"var validShells = map[string]bool{\"bash\":true,\"zsh\":true,\"fish\":true,\"powershell\":true}\nif !validShells[shell] {\n  return fmt.Errorf(\"unsupported shell %q; use bash, zsh, fish or powershell\", shell)\n}","typeGuard":null,"tryCatchPattern":"out, err := exec.Command(\"task\", \"--completion\", shell).Output()\nif err != nil {\n  // fall back to bash completion or show supported shells\n}","preventionTips":["Whitelist shell names before invoking --completion","Use exact lowercase names matching Task's switch cases","Read task --help to confirm supported shells for your version"],"tags":["cli","completion","invalid-argument"],"backgroundTag":"invalid-argument-value","analyzedSha":"385e5ad92af02877b6d7cf9dcc963b5ed916e70a","analyzedAt":"2026-09-05T09:01:05.226Z","contentChangedAt":"2026-09-05T09:01:05.226Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}