Skip to main content

write_user_kv

Function write_user_kv 

Source
pub fn write_user_kv(key: &str, value: &str) -> Result<(), ConfigError>
Expand description

Write a single user-scoped key/value to $XDG_CONFIG_HOME/mkit/config. Reads the existing file (if any), updates the matching line (or appends), and writes back. Caller is responsible for validating value (control bytes, key-path traversal).