Skip to content

fix: preserve LESS options in enter pager - #551

Draft
wfxr wants to merge 1 commit into
mainfrom
fix/preserve-less-options
Draft

fix: preserve LESS options in enter pager#551
wfxr wants to merge 1 commit into
mainfrom
fix/preserve-less-options

Conversation

@wfxr

@wfxr wfxr commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have added unit tests for my code
  • I have made corresponding changes to the documentation

Description

Preserve user-defined LESS options when opening the full-screen Enter pager. Like Git, forgit now honors an existing LESS value rather than replacing it; the required color and stay-open behavior is expressed through command-line options.

Add regression coverage for inherited LESS options and document the default FORGIT_ENTER_PAGER behavior.

Fixes #538.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Test
  • Documentation change
  • CI change

Test environment

  • Shell
    • bash
    • zsh
    • fish
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

Additional verification: lib/bashunit tests (74 tests, 123 assertions), shfmt, Bash syntax check, rumdl, and ShellCheck 0.11.0 with the repository's pre-existing SC2218 findings excluded.

Pass the required color and stay-open flags directly to less so forgit no longer replaces users' LESS environment options. Add regression coverage and document the default behavior.
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5cff30fc-b0b8-447f-afec-9cb51a38ebdc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

don't reset LESS

1 participant