config: migrate autosuggestion + make config show registry-aware#360
Merged
Conversation
Convert the four autosuggestion.* enum keys (dismiss_policy, rank, partial_accept, sources) to the registry binding + layer model -- the same strangler step proven on history.*. Bind each to its config.autosuggestion_* enum cell via a declarative creg_enum_pair_t table, delete autosuggestion_sync_to_runtime and autosuggestion_sync_from_runtime (and their strcmp ladders), remove the keys from the legacy config_options[] table, drop the now-dead config_enum_def tables, and NULL the section's sync hooks. The keys now resolve through the registry: config set lands in the SESSION layer (survives a mode switch) and config explain shows the layered provenance. Full suite green.
…rable As a section migrates off the legacy config_options[] table, its keys would vanish from `config show` (which iterates only that table) -- a discoverability regression for a shell whose configuration system is meant to be its most discoverable feature. After the legacy keys, config_show_section now enumerates the matching CREG registry section and prints the keys the legacy loop did not (the migrated ones) with their effective values and descriptions, deduped against the legacy table. history.* and autosuggestion.* are visible again.
config_show_all never emitted the [autosuggestion] section, so its keys were invisible in config show even before the migration. Add it alongside the other sections; with the registry-aware section printer the four autosuggestion keys now appear with their effective values.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The second strangler step of the configuration nervous system, plus the discoverability fix the migrations require.
Migrate the autosuggestion section (commit 1)
The four
autosuggestion.*enum keys (dismiss_policy,rank,partial_accept,sources) move onto the registry binding + layer model proven onhistory.*: bound to theirconfig.autosuggestion_*enum cells via declarativecreg_enum_pair_ttables;autosuggestion_sync_to/from_runtimeand their strcmp ladders deleted; removed from the legacyconfig_options[]table; deadconfig_enum_deftables dropped; section hooks NULL.config setlands in SESSION (survives a mode switch);config explainshows the layered provenance.Keep
config showcomplete (commits 2-3)As a section migrates off the legacy table, its keys would vanish from
config show(which iterated only that table) — a discoverability regression for a shell whose config system is meant to be its most discoverable feature.config_show_sectionnow also enumerates the matching registry section and prints the migrated keys with their effective values + descriptions, deduped against legacy. Also adds the[autosuggestion]section toconfig show, which was never emitted at all.Verification
meson test: 156/156, zero warnings.config showlists the migratedhistory.*and the new[autosuggestion]keys with values + help;config explainshows the provenance stack; round-trips through the binding.Continues toward retiring the legacy
config_options[]table perdocs/development/CONFIG_NERVOUS_SYSTEM.md.🤖 Generated with Claude Code