Skip to content

Document -n/--max-iterations in the man page - #2108

Merged
fasterit merged 1 commit into
htop-dev:mainfrom
rawsun007:docs/man-max-iterations
Sep 15, 2026
Merged

fasterit merged 1 commit into
htop-dev:mainfrom
rawsun007:docs/man-max-iterations

Conversation

@rawsun007

Copy link
Copy Markdown
Contributor

-n, --max-iterations=NUMBER is in the getopt table (CommandLine.c:163, short option n:) and in --help, but the man page never listed it. Every other option the parser accepts is documented there, so this is the one gap:

$ mandoc -T ascii htop.1 | grep -c max-iterations
0

Placed next to -d --delay, since both bound how long a run lasts rather than what it shows.

Verified by rendering the page with @sysconfdir@ substituted: mandoc -T ascii shows the new entry in COMMAND-LINE OPTIONS, and mandoc -T lint reports the same five pre-existing long-line style notes as before the change, none of them on the added lines. ./htop -n 1 exits 0.

Assisted-by: Claude Opus 5 (Claude Code), per docs/ai-contributions-policy.md. Written and verified under my account; the commit carries the trailer.

The option is in the getopt table and in --help, but the man page never
listed it.

Assisted-by: Claude Opus 5 (Claude Code)
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 26e8b664-97d7-457d-a0b7-100a89d3bcd1

📥 Commits

Reviewing files that changed from the base of the PR and between 07fbb8d and 201cecd.

📒 Files selected for processing (1)
  • htop.1.in

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The man page now documents -n --max-iterations=NUMBER. It states that htop exits after the specified number of frame updates.

Suggested reviewers: fasterit

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to 201ce

The man page accurately documents the existing max-iterations option, so the change is ready to merge.


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

A frame count joins the page
htop now marks its final stage
Each update moves the number on
Then the monitor quietly moves on
Clear docs guide the option's way

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

@fasterit
fasterit merged commit 90d27d2 into htop-dev:main Sep 15, 2026
21 checks passed
@fasterit fasterit added the documentation 📖 Improvements or additions to documentation label Sep 15, 2026
@fasterit fasterit added this to the 3.6.0 milestone Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📖 Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants