feat(config-settings): replace the ANSI renderer with a curses front-end #141

Merged
rootiest merged 5 commits from feat/config-settings-curses-tui into main 2026-09-09 19:54:12 +00:00
2 changed files with 18 additions and 2 deletions
Showing only changes of commit 208ad95883 - Show all commits
+4 -2
View File
@@ -331,8 +331,10 @@ Each category further sub-divides into two to six sub-categories with
their own `__fish_config_op_<category>_<subcategory>` toggles (e.g.
`__fish_config_op_aliases_filesystem`), following the exact same
truthy/falsy/unset cascade one level deeper. Run `config-settings` and
press Enter on a category row to browse and toggle its sub-categories, or
see the [Components Reference](https://fish.rootiest.fyi/08-components-reference/)
press Enter on a category row to browse and toggle its sub-categories
or press `/` and type, which searches sub-categories across every
category at once and lists the hits as `Category Sub`. Or see the
[Components Reference](https://fish.rootiest.fyi/08-components-reference/)
for the full sub-category list per category.
---
+14
View File
@@ -146,7 +146,21 @@ function config-settings --description 'Interactive TUI for managing fish config
# page's `set -g` land in the caller's shell instead of in a child that is
# about to exit. `command` throughout: this repo's own aliases shadow rm.
set -l work (command mktemp -d)
if test -z "$work" -o ! -d "$work"
echo "$c_err""config-settings: could not create a temporary directory.$c_reset" >&2
return 1
end
# An empty dump would not fail loudly -- the TUI would simply render every
# row as DEFAULT, which is indistinguishable from a config where nothing is
# set. That is a wrong answer, not a missing one, so refuse instead. The
# taxonomy alone guarantees a non-empty dump on any working checkout.
__config_settings_state >$work/state
if not test -s $work/state
echo "$c_err""config-settings: __config_settings_state produced no output.$c_reset" >&2
command rm -rf $work
return 1
end
python3 $tui --state $work/state --emit $work/edits
set -l rc $status