Skip to content

Forward all user's parameters set in PAGER and improve flag detection - #3777

Merged
Rowlando13 merged 1 commit into
pallets:mainfrom
kdeldycke:pager-followups
Aug 19, 2026
Merged

Rowlando13 merged 1 commit into
pallets:mainfrom
kdeldycke:pager-followups

Conversation

@kdeldycke

@kdeldycke kdeldycke commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Another PR following up on pager refactors that:

  • Forwards all user's parameters set in PAGER
  • Improve detection of raw mode by extending flag and option parsing
  • Fix detection of less.exe on Windows (even if not currently exercised, this make the method future-proof)

But more importantly: adds dozen of testing with weird edge-cases around pager's internal methods.

Follows up on:

@kdeldycke kdeldycke added test runner CliRunner and Click's test utilities feature windows Windows-specific behavior labels Aug 18, 2026
@kdeldycke kdeldycke added this to the 8.5.0 milestone Aug 18, 2026
@kdeldycke
kdeldycke marked this pull request as draft August 18, 2026 08:12
@kdeldycke kdeldycke added tests Click's own test suite and CI workflows and removed test runner CliRunner and Click's test utilities feature labels Aug 18, 2026
@kdeldycke kdeldycke changed the title WIP: Forwards all user's parameters set in PAGER Forwards all user's parameters set in PAGER and improve flag detection Aug 18, 2026
@kdeldycke kdeldycke changed the title Forwards all user's parameters set in PAGER and improve flag detection Forward all user's parameters set in PAGER and improve flag detection Aug 18, 2026
@kdeldycke
kdeldycke marked this pull request as ready for review August 18, 2026 09:07

@davidism davidism left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems right to me.

@kdeldycke

Copy link
Copy Markdown
Collaborator Author

Seems right to me.

Just a note re-reading my code, I am not 100% sure that I am covering all the funky edge cases that a user can put in a LESS environment, so I regrouped the parsing bits in a _less_uses_raw_mode private method. So in the future, we can easily update it and its paired test_pipepager_less_raw_mode_detection test to add more edge cases.

Improve detection of raw mode by parsing the option tokens
Fix detection of `less.exe` on Windows
@Rowlando13
Rowlando13 merged commit 2103e15 into pallets:main Aug 19, 2026
12 checks passed
@kdeldycke
kdeldycke deleted the pager-followups branch August 19, 2026 15:34
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tests Click's own test suite and CI workflows windows Windows-specific behavior

Projects

None yet

3 participants