fix(hive-forge): hint to stderr when list page is full (more results may exist)
This commit is contained in:
parent
9727cee9bd
commit
26aba38fc6
1 changed files with 12 additions and 0 deletions
|
|
@ -143,6 +143,18 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
for item in items {
|
||||
print_row(item);
|
||||
}
|
||||
// When the returned page is exactly `--limit` items, more pages
|
||||
// may exist. Print a hint to stderr so the caller knows to fetch
|
||||
// the next page rather than assuming the result is complete. Only
|
||||
// fires on a full page — a short or empty page signals the end.
|
||||
if items.len() as u64 == args.limit {
|
||||
eprintln!(
|
||||
"… {} shown (page {}); more results may exist — re-run with --page {} (or raise --limit).",
|
||||
args.limit,
|
||||
args.page,
|
||||
args.page + 1
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue