{"record":{"id":"44fd9e71887c3e23","repo":"jdx/mise","slug":"the-packslip-of-declares-no-shell-completion","errorCode":null,"errorMessage":"the packslip of {} declares no {shell} completion","messagePattern":"the packslip of (.+?) declares no (.+?) completion","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/packslip.rs","lineNumber":1175,"sourceCode":"    let artifact = selected_artifact(\n        &statement,\n        tv.request.options().get_string(\"variant\").as_deref(),\n    );\n    let sources = completion_sources(\n        &statement,\n        &install_path,\n        shell,\n        artifact.as_ref(),\n        Some(tool),\n    );\n    if sources.is_empty() {\n        if declares_completion(&statement, shell) {\n            bail!(\n                \"the packslip of {} declares a {shell} completion, but none of the files it names are in the install: the resource fetch failed or was skipped\",\n                tv.style()\n            );\n        }\n        bail!(\n            \"the packslip of {} declares no {shell} completion\",\n            tv.style()\n        );\n    }\n    // A completion is asked for the moment a shell completes the command,\n    // which is when the user was going to run it anyway, so an `exec`\n    // source runs on demand with no setting; the specification's Running\n    // an exec entry says so. Because it runs the tool, its result is\n    // cached beside the install so the command runs once per version and\n    // shell rather than at every tab.\n    let bin = completion_bin(&statement, Some(tool)).ok_or_else(|| {\n        eyre!(\n            \"{} provides several executables; name the command to complete\",\n            tv.style()\n        )\n    })?;\n    let cache = completion_cache_path(&install_path, bin, shell)?;\n    // Nothing below happens until a source that runs the tool comes up. A","sourceCodeStart":1157,"sourceCodeEnd":1193,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/packslip.rs#L1157-L1193","documentation":"The tool's packslip statement contains no completion resource for the requested shell at all. mise enumerates the statement's declared completion sources for the shell; when the list is empty and the statement does not even declare a completion for that shell, it reports that the packslip declares no such completion rather than pretending one exists.","triggerScenarios":"Running `mise completion <shell> --tool <tool>` (or a shell requesting lazy completion registration) where the packslip statement for the installed version has no completion entry for that shell — e.g. asking for fish completions when the packslip only declares bash and zsh.","commonSituations":"Requesting completions for a shell the publisher does not support; a packslip authored without completion declarations; older release of a tool predating completion declarations.","solutions":["Request a shell the packslip supports (check the statement's completion entries, typically bash/zsh/fish/pwsh).","Upgrade the tool to a newer release whose packslip declares your shell's completion.","If you publish the packslip, add a completion resource for the missing shell.","Generate the completion with the tool's own CLI and source it manually in your shell config."],"exampleFix":"// before\nmise completion pwsh --tool jq  # packslip declares no pwsh completion\n// after\nmise completion bash --tool jq","handlingStrategy":"validation","validationCode":"let supported = declared_completion_shells(&statement); // e.g. [\"bash\",\"zsh\"]\nif !supported.contains(&shell.to_string()) { eprintln!(\"{tool} packslip declares no {shell} completion\"); }","typeGuard":"fn shell_declared(statement: &Statement, shell: &str) -> bool { declares_completion(statement, shell) }","tryCatchPattern":"if !declares_completion(&statement, shell) {\n    eprintln!(\"no native {shell} completion; sourcing tool-generated script instead\");\n    return tool_native_completions(tool, shell);\n}","preventionTips":["Check which shells a packslip declares before wiring lazy completions for that tool.","Pin newer tool releases that declare your shell's completion.","Publishers: declare completion resources for all supported shells in the packslip."],"tags":["completions","packslip","unsupported-shell"],"backgroundTag":"unsupported-operation","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}