Skip to content

fix: --list-themes ignores BAT_OPTS --paging=always - #4002

Open
yunaremaia wants to merge 1 commit into
sharkdp:masterfrom
yunaremaia:fix-list-themes-paging
Open

fix: --list-themes ignores BAT_OPTS --paging=always#4002
yunaremaia wants to merge 1 commit into
sharkdp:masterfrom
yunaremaia:fix-list-themes-paging

Conversation

@yunaremaia

Copy link
Copy Markdown

Summary

When BAT_OPTS contains --paging=always, running bat --list-themes paginates
one theme at a time and hides the theme names, making the command unusable.

Fixes #1618.

Changes

  • Force paging_mode = PagingMode::Never inside list_themes() so the output
    is always a single non-paged list regardless of BAT_OPTS or --paging.
  • Add regression test list_themes_with_paging_always_from_bat_opts that sets
    BAT_OPTS=--paging=always and asserts all themes appear in the output.

Verification

BAT_OPTS=--paging=always bat --list-themes

Before: paged one theme at a time, names hidden.
After: prints all themes in a single list.

All existing list_themes tests still pass.

When BAT_OPTS contains --paging=always, --list-themes paginates one
theme at a time and hides theme names. Force paging off inside
list_themes() so output is always a single non-paged list.

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

--list-themes + BAT_OPTS can be problematic

1 participant