Skip to content

feat: deprecate --style=auto in favor of --decorations=auto (fixes #3752)#3770

Open
leno23 wants to merge 2 commits into
sharkdp:masterfrom
leno23:fix/deprecate-style-auto-3752
Open

feat: deprecate --style=auto in favor of --decorations=auto (fixes #3752)#3770
leno23 wants to merge 2 commits into
sharkdp:masterfrom
leno23:fix/deprecate-style-auto-3752

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 26, 2026

Summary

Warn when users pass the deprecated auto style component (--style=auto or BAT_STYLE=auto). Decoration visibility should be controlled via --decorations=auto (the default), not --style.

Changes

  • src/style.rsStyleComponentList::contains_auto()
  • src/bin/bat/app.rs — emit bat_warning! when auto appears in --style
  • tests/integration_tests.rs — assert warning in piped_output_with_auto_style
  • CHANGELOG.md — unreleased entry

Behavior

No functional change yet; only a deprecation warning. Existing piped_output_with_auto_style behavior is preserved.

Fixes #3752

Test plan

  • cargo test --test integration_tests piped_output_with_auto_style
  • cargo clippy --all-targets --all-features -- -D warnings

Made with Cursor

leno23 added 2 commits May 27, 2026 01:07
Emit a bat warning when the deprecated `auto` style component is used
explicitly. Behavior is unchanged for now.

Fixes sharkdp#3752
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.

Deprecate --style=auto in favour of --decorations=auto

1 participant