Skip to content

config: remove confirmed-dead configuration keys#362

Merged
berrym merged 3 commits into
masterfrom
config/remove-dead-keys
Jun 26, 2026
Merged

config: remove confirmed-dead configuration keys#362
berrym merged 3 commits into
masterfrom
config/remove-dead-keys

Conversation

@berrym

@berrym berrym commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Removes 22 configuration keys that had no runtime consumer — their struct
fields were set and round-tripped through config get/set/show, but no
subsystem read them to affect behavior. Each was verified dead by an
exhaustive per-field consumer search.

  • LLE history: 13 unwired lle.* / history.file keys
  • network: 3 abandoned cloud-discovery keys (SSH keys retained)
  • behavior: 6 dead keys + their symbol-table mirrors and accessor
  • prompt: the entire orphaned prompt./theme- section + its enum

CONFIG_SECTION_KEYS is kept as the keybinding-persistence design anchor;
the four network SSH keys are retained as wiring targets. Future theming
will use a new display.lle.theme key rather than reusing the removed
prompt keys.

156/156 tests pass; clean build under -Werror.

berrym added 3 commits June 25, 2026 20:32
These history.*/lle.* keys had no runtime consumers: the configuration
struct fields existed and accepted values, but no subsystem read them.

Removed keys and their backing fields:
  history.file                      lush never read config.history_file;
                                    LLE history uses lle.history_file
  lle.enable_multiline_navigation
  lle.wrap_history_navigation
  lle.save_line_on_history_nav
  lle.preserve_multiline_structure
  lle.show_multiline_indicators
  lle.enable_interactive_search     Ctrl-R search is always on, ungated
  lle.search_fuzzy_matching
  lle.search_case_sensitive
  lle.storage_mode
  lle.sync_with_readline
  lle.export_to_bash_history
  lle.readline_compatible_mode

Multiline editing remains gated by lle.enable_multiline_editing, which is
retained. The lle_history_storage_mode_t enum,
config_validate_lle_storage_mode, and the storage-mode enum tables are
removed with their sole consumer. The legacy history_file -> history.file
alias and the embedded default-TOML lines for the removed keys are dropped.

The LLE diagnostics output no longer prints an "Interactive search" status
line for the removed always-on feature.
These keys had no runtime consumer. Their config struct fields were set
and round-tripped through config get/set/show, but no subsystem read them
to influence behavior. Verified by exhaustive per-field consumer search.

Network (abandoned cloud-discovery feature; the four SSH host-completion
keys are retained as wiring targets):
  network.cloud_discovery
  network.show_remote_context
  network.auto_detect_cloud

Behavior:
  behavior.no_word_expand    globbing is controlled by shell_opts (set -f);
                             the NO_WORD_EXPAND shell-variable mirror and
                             get_no_word_expand() had no readers or callers
  behavior.multiline_mode    only fed the unread MULTILINE_MODE mirror
  behavior.color_scheme      no longer used; colors are handled by the spec
                             highlighter (command_layer.c)
  behavior.colors_enabled    only fed the unread COLORS_ENABLED mirror
  behavior.verbose_errors    no consumer
  behavior.debug_mode        no consumer; the live debug_mode flags belong
                             to display_integration_config_t, a different
                             struct

For each key this removes the config struct field, config_options[] row,
legacy alias, default-TOML line, config_set_defaults assignment, and the
config_free entry where applicable. Also removes the now-unreferenced
COLORS_ENABLED / NO_WORD_EXPAND / MULTILINE_MODE symbol-table mirrors, the
get_no_word_expand accessor, the config_validate_color_scheme validator,
and their tests. The display test stub drops the two removed initializers.
The entire prompt.* / theme-* configuration family had no runtime
consumer. The config struct fields were set and round-tripped through
config get/set/show, but the prompt and theme machinery reads its own
state, not these fields:
  - the LLE prompt composer hardcodes the active theme and never reads
    config.prompt_theme / config.theme_name
  - the git prompt is rendered by the LLE segment system; its visibility
    is decided by whether the cwd is a git repository, not by
    config.git_prompt_enabled / config.git_cache_timeout
  - nothing reads use_theme_prompt, prompt_format, the theme_corporate_*
    fields, the theme_show_* / theme_enable_* toggles, or
    theme_color_support_override

Verified dead by an exhaustive per-field consumer search.

Removed all 18 prompt.* keys: their config struct fields, the legacy
flat-name aliases, the default-TOML block, the config_set_defaults
assignments, the config_free entries, and the now-empty
CONFIG_SECTION_PROMPT enum value with its section-parse, show-argument,
and config_show_all handling. Future theming will use a new
display.lle.theme key rather than reusing these orphaned keys.

CONFIGURATION.md drops the [prompt] example block and the stale theme
config-set equivalence note.
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@berrym berrym merged commit 3ba1fe9 into master Jun 26, 2026
5 checks passed
@berrym berrym deleted the config/remove-dead-keys branch June 26, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant