Add a grut config get <key> subcommand that prints a single resolved config value. Today grut config can check the config, but there is no way to read one value for use in a script or to confirm what grut actually resolved after defaults are applied.
The key uses dotted notation matching the TOML structure (for example ui.theme or git.autofetch). The command loads the config the same way the app does, walks to the requested key, and prints the value to stdout. A scalar prints as a plain value so it pipes cleanly. A section prints as TOML. An unknown key exits non-zero with a clear message.
Acceptance criteria
grut config get <key> prints the resolved value for a dotted key and exits 0.
- A scalar leaf prints the bare value with no decoration, so
$(grut config get ui.theme) works in a script.
- A section key prints that subtree as TOML.
- An unknown key prints an error to stderr and exits non-zero.
- Defaults are applied, so a key the user never set still returns grut's effective value.
- Unit tests cover a scalar key, a section key, an unknown key, and a config load error.
Add a
grut config get <key>subcommand that prints a single resolved config value. Todaygrut configcan check the config, but there is no way to read one value for use in a script or to confirm what grut actually resolved after defaults are applied.The key uses dotted notation matching the TOML structure (for example
ui.themeorgit.autofetch). The command loads the config the same way the app does, walks to the requested key, and prints the value to stdout. A scalar prints as a plain value so it pipes cleanly. A section prints as TOML. An unknown key exits non-zero with a clear message.Acceptance criteria
grut config get <key>prints the resolved value for a dotted key and exits 0.$(grut config get ui.theme)works in a script.