{"record":{"id":"ae2ddafd7be25634","repo":"jdx/mise","slug":"raw-multiple-dotfiles-edit-entries-match-cho","errorCode":null,"errorMessage":"{raw}: multiple [dotfiles] edit entries match; choose one of: {keys}","messagePattern":"(.+?): multiple \\[dotfiles\\] edit entries match; choose one of: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/edit.rs","lineNumber":124,"sourceCode":"            return Ok(Some(match &req.op {\n                EditOp::Block {\n                    source: BlockSource::File(path),\n                    ..\n                } => path.clone(),\n                EditOp::Block {\n                    source: BlockSource::Inline(_),\n                    ..\n                }\n                | EditOp::Line { .. } => req.config_path.clone(),\n            }));\n        }\n        edits => {\n            let keys = edits\n                .iter()\n                .map(|req| req.config_key())\n                .collect::<Vec<_>>()\n                .join(\", \");\n            bail!(\"{raw}: multiple [dotfiles] edit entries match; choose one of: {keys}\");\n        }\n    }\n    if target.is_relative() {\n        bail!(\"{raw}: target must be absolute or start with ~/\");\n    }\n    Ok(None)\n}\n\nfn open_or_create(path: &std::path::Path) -> Result<()> {\n    if !path.exists() {\n        if let Some(parent) = path.parent() {\n            file::create_dir_all(parent)?;\n        }\n        file::write(path, \"\")?;\n    }\n    Ok(())\n}\n","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/cli/dotfiles/edit.rs#L106-L142","documentation":"Thrown by `mise bootstrap dotfiles edit <TARGET>` when the TARGET argument matches more than one `[[dotfiles.edit]]` entry across the loaded config files. Because each edit entry can point at a different source (a Block-from-file path, the config file itself for inline/line edits), mise cannot decide which one to open in the editor, so it refuses and lists the matching config keys. It is a disambiguation error, not corruption: exactly one edit entry must match.","triggerScenarios":"Running `mise bootstrap dotfiles edit ~/.zshrc` when two `[[dotfiles.edit]]` entries both pass `system::edits::matches_target` for that argument — e.g. one with `path = '~/.zshrc'` in the global config and another with a matching glob such as `path = '~/.z*'` in a project mise.toml, or duplicate entries for the same path in different config files.","commonSituations":"Dotfile edit entries defined in both `~/.config/mise/mise.toml` and a checked-in project `mise.toml` that overlap through globs; a broad pattern like `~/*rc` added later shadowing an exact-path entry; renaming a target so an old entry and a new entry both match a shorthand argument.","solutions":["Pass the exact config key of the entry you want instead of a path prefix or glob shorthand — the error message lists the valid `keys`","Remove or tighten one of the overlapping `[[dotfiles.edit]]` entries (make globs more specific, delete stale duplicates from the global or project mise.toml)","Run `mise bootstrap dotfiles status` to see every configured file/edit target and spot the overlap","If both entries are intentional, target the distinct source/config file each entry declares instead of the shared target"],"exampleFix":"# before (~/.config/mise/mise.toml)\n[[dotfiles.edit]]\npath = '~/.zshrc'\n# (project mise.toml)\n[[dotfiles.edit]]\npath = '~/.z*'         # also matches ~/.zshrc\n\n# after (project mise.toml)\n[[dotfiles.edit]]\npath = '~/.zprofile'   # disjoint from the global entry","handlingStrategy":"validation","validationCode":"# List every configured edit target and check for ambiguity before editing\nmise bootstrap dotfiles status | grep -F \"$TARGET\" # >1 hit = ambiguous","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exact target paths, never glob shorthands, when invoking dotfiles edit","Keep each dotfile target owned by exactly one [[dotfiles.edit]] entry across global and project configs","Audit overlapping edit-path patterns after adding new entries"],"tags":["mise","dotfiles","config","ambiguous-match"],"backgroundTag":"ambiguous-config-match","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}