{"record":{"id":"fd19e2eef2e1405a","repo":"helix-editor/helix","slug":"unknown-key","errorCode":null,"errorMessage":"Unknown key `{}`","messagePattern":"Unknown key `(.+?)`","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"helix-term/src/commands/typed.rs","lineNumber":2267,"sourceCode":"\n        // When a user hits backspace and there are no numbers left,\n        // we can bring them back to their original selection. If they\n        // begin typing numbers again, we'll start a new preview session.\n        PromptEvent::Update if args.is_empty() => abort_goto_line_number_preview(cx),\n        PromptEvent::Update => update_goto_line_number_preview(cx, args)?,\n    }\n\n    Ok(())\n}\n\n// Fetch the current value of a config option and output as status.\nfn get_option(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {\n    if event != PromptEvent::Validate {\n        return Ok(());\n    }\n\n    let key = &args[0].to_lowercase();\n    let key_error = || anyhow::anyhow!(\"Unknown key `{}`\", key);\n\n    let config = serde_json::json!(cx.editor.config().deref());\n    let pointer = format!(\"/{}\", key.replace('.', \"/\"));\n    let value = config.pointer(&pointer).ok_or_else(key_error)?;\n\n    cx.editor.set_status(value.to_string());\n    Ok(())\n}\n\n/// Change config at runtime. Access nested values by dot syntax, for\n/// example to disable smart case search, use `:set search.smart-case false`.\nfn set_option(cx: &mut compositor::Context, args: Args, event: PromptEvent) -> anyhow::Result<()> {\n    if event != PromptEvent::Validate {\n        return Ok(());\n    }\n\n    let (key, arg) = (&args[0].to_lowercase(), args[1].trim());\n","sourceCodeStart":2249,"sourceCodeEnd":2285,"githubUrl":"https://github.com/helix-editor/helix/blob/079a789e8cb08ead67f19e1971a1b7438b37354b/helix-term/src/commands/typed.rs#L2249-L2285","documentation":"`:get <key>` serializes the live editor config to JSON and resolves the (lowercased) dotted key as a JSON pointer ('/a/b'). Any path that does not exist in the serialized config — wrong name, wrong path segment, or a key from a different helix version — returns 'Unknown key `x`'. No state is changed; it is a read-only lookup.","triggerScenarios":"`:get bogus`, `:get lsp.bogus`, or a key valid in another helix version; also wrong path segment order like `:get smart-case.search`.","commonSituations":"Guessing key names instead of copying from the config reference; version drift after an upgrade renamed/moved keys; typos.","solutions":["Copy the exact dotted path from the config documentation — the same names config.toml uses (e.g. `:get search.smart-case`).","Query parent keys stepwise (`:get search`) to discover the existing subtree.","Use `:config-open` to see a config with valid keys side by side."],"exampleFix":"# before\n:get smartcase\n# after\n:get search.smart-case","handlingStrategy":"validation","validationCode":"// same resolution :get uses — probe the pointer before reading\nlet cfg = serde_json::json!(editor.config().deref());\nlet pointer = format!(\"/{}\", key.to_lowercase().replace('.', \"/\"));\nif cfg.pointer(&pointer).is_none() { /* unknown key: reject early */ }","typeGuard":"fn config_key_exists(editor: &Editor, key: &str) -> bool {\n    let cfg = serde_json::json!(editor.config().deref());\n    cfg.pointer(&format!(\"/{}\", key.to_lowercase().replace('.', \"/\"))).is_some()\n}","tryCatchPattern":null,"preventionTips":["Discover keys with `:get <parent>` before scripting reads of leaf keys.","Re-verify dotted paths after helix upgrades; config keys move between versions."],"tags":["config","command","options"],"backgroundTag":null,"analyzedSha":"079a789e8cb08ead67f19e1971a1b7438b37354b","analyzedAt":"2026-08-16T09:09:59.668Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}