Skip to content

feat(search): add --limit/-n and --max-results aliases for the result cap - #146

Merged
f3rdy merged 2 commits into
masterfrom
feat/133-search-limit
Oct 21, 2026
Merged

f3rdy merged 2 commits into
masterfrom
feat/133-search-limit

Conversation

@f3rdy

@f3rdy f3rdy commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Problem (from #133, measured 2026-09-20 with v1.33.0)

budjira search rejected the two spellings users intuitively try to cap a result set:

$ budjira search "..." --limit 5
Error: No such option: --limit
$ budjira search "..." --max-results 5
Error: No such option: --max-results

Change

The cap already existed as --max/-m and is passed through to maxResults of the search call, where jira-python treats it as the total number of results across pages (not the page size). This PR makes --limit, -n and --max-results additional names for the same option instead of adding a second, competing parameter.

Default / compatibility

Default stays 50, behaviour without the flag is unchanged — existing scripts see no difference.

Evidence

│ --max,--limit,--max-…  -m,-n      INTEGER RANGE         Maximum total number │
│                                   [1<=x<=1000]          of results to return │
│                                                         (across pages)       │
  • New parametrized CLI test proves each spelling reaches search_issues(..., max_results=5); existing --max test untouched and green.
  • Full suite: 1423 passed, 3 skipped; ruff, mypy, bandit green.
  • budjira ai usage-prompt --plain output checked: the new spellings are documented there (regenerated .claude/ai-usage-prompt.md in a separate docs commit).

Closes #133

f3rdy added 2 commits October 21, 2026 13:12
… cap

Users intuitively try --limit and --max-results to cap a search; both
spellings were rejected although the cap already existed as --max/-m.
All spellings now name the same option, which is passed through to
maxResults as the total number of results across pages. Default stays
50, so existing scripts see no change.

Closes #133
Regenerate .claude/ai-usage-prompt.md after the search result-cap
aliases (--limit/-n, --max-results).
@f3rdy
f3rdy merged commit c578695 into master Oct 21, 2026
5 checks passed
@f3rdy
f3rdy deleted the feat/133-search-limit branch October 21, 2026 12:31
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.

feat(search): add a result limit option to budjira search

1 participant