Skip to content

feat(more): exit_on_eof option#10667

Open
aaron-ang wants to merge 1 commit into
uutils:mainfrom
aaron-ang:more-options
Open

feat(more): exit_on_eof option#10667
aaron-ang wants to merge 1 commit into
uutils:mainfrom
aaron-ang:more-options

Conversation

@aaron-ang

@aaron-ang aaron-ang commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Fix part of #2320.

@aaron-ang
aaron-ang force-pushed the more-options branch 2 times, most recently from fa90357 to 4274f7b Compare February 3, 2026 00:23
@codspeed-hq

codspeed-hq Bot commented Feb 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 317 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing aaron-ang:more-options (a86c267) with main (94b06d9)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@aaron-ang
aaron-ang force-pushed the more-options branch 2 times, most recently from ca5cb85 to bbe07a0 Compare February 3, 2026 16:31
@sylvestre

Copy link
Copy Markdown
Contributor

please split this PR into several

@aaron-ang aaron-ang changed the title feat(more): logical, exit_on_eof, no_pause options feat(more): exit_on_eof option Feb 3, 2026
@aaron-ang

aaron-ang commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

@sylvestre this PR now covers exit_on_eof option only, with some minor refactoring on existing structs and tests. Once this is merged, I will add the remaining option implementations (logical and no_pause)

@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/follow-name (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/follow-name (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

@aaron-ang
aaron-ang force-pushed the more-options branch 2 times, most recently from bdb12cd to 1066028 Compare February 4, 2026 15:24
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)

@aaron-ang
aaron-ang force-pushed the more-options branch 2 times, most recently from 4d31915 to e0d6aae Compare February 4, 2026 17:24
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@aaron-ang
aaron-ang force-pushed the more-options branch 2 times, most recently from 03f8b60 to ac58c50 Compare February 4, 2026 18:26
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@aaron-ang

Copy link
Copy Markdown
Contributor Author

@sylvestre slimmed this PR down per your request. It now contains only the exit_on_eof feature (~50 lines):

  • Options::exit_on_eof (replaces _exit_on_eof), with POSIXLY_CORRECT + tty gate per the spec
  • Pager honors the flag in process_events and exits early from more() after the initial draw when EOF is already reached
  • Integration test test_space_at_eof_does_not_exit_without_exit_on_eof; existing pty tests set POSIXLY_CORRECT=1 to keep behavior under test
  • -e/--exit-on-eof added to test_valid_arg

The previously bundled refactors (Input struct, highlight_text/tty-gate helpers, test infra, renames, pattern lifetime) are deferred to follow-up PRs. Rebased on main.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/retry (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/tail-n0f (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/follow-name (passes in this run but fails in the 'main' branch)
Skip an intermittent issue tests/pr/bounded-memory (was skipped on 'main', now failing)

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.

2 participants