Skip to main content

set_array_at

Function set_array_at 

Source
pub fn set_array_at(path: &Path, key: &str, items: &[String]) -> Result<()>
Expand description

Array variant of set_value_at for the in-TUI Keys tab (issue #294): write key = ["a", "b", …] as a TOML array of strings at an explicit path. Backs the keymap rebind surface — a global action’s chord list under [tui.keys], or a modal verb’s single-stroke list under [tui.keys.modal.<context>]. An empty items writes key = [], the legitimate “unbind” value. Reuses the same parent-dir creation, surgical toml_edit edit and validate-before-write as the scalar writers, so a rebind that produces a conflicting / prefix-colliding keymap is rejected before it can clobber a good file.