Skip to content

Request for Comments: Backwards compatible yaml-options rename#1096

Open
visrosa wants to merge 1 commit into
noborus:masterfrom
visrosa:ux/yaml-backwards-compatible-rename
Open

Request for Comments: Backwards compatible yaml-options rename#1096
visrosa wants to merge 1 commit into
noborus:masterfrom
visrosa:ux/yaml-backwards-compatible-rename

Conversation

@visrosa

@visrosa visrosa commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

As mentioned in my first PR, I have some user interface suggestions involving renaming some YAML options and CLI flags.

This is a showcase of the changes I would propose, without breaking backward compatibility.

Disclaimer: this PR is AI-assisted. This PR is presented exclusively for review and comment, not for merging as-is.

… aliases

Add oviewer/compat.go, which registers new canonical names as forward
aliases for existing internal names across two config surfaces:

- viper aliases map new YAML/env-var key names to existing internal keys,
  so configs written with new names load correctly without any internal
  rename.
- Action dispatch aliases add new action string names alongside the
  existing ones: alternate_rows_mode, column_rainbow_mode, write_on_exit,
  hide_other_section, row_header, row_header_column, write_exit_range,
  debug_log.

A deprecation warning is emitted to stderr for each old-name key detected
in the loaded configuration (file, env var, or CLI flag). The check runs
before alias registration so viper.IsSet reflects direct usage only.

No internal names change; all existing config files, env vars, and custom
keybind configs continue to work unchanged.

Reference configs (ov.yaml, ov-less.yaml, ov.yaml.template) updated to
use the new canonical names throughout.
@visrosa visrosa force-pushed the ux/yaml-backwards-compatible-rename branch from ef08a3f to ae92157 Compare June 10, 2026 00:01
@visrosa visrosa changed the title Backwards compatible yaml-options rename (Request for Comments) Request for Comments: Backwards compatible yaml-options rename Jun 10, 2026
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