gh alias set merged 'pr list --state merged --limit 20'

Category: GitHub CLI

gh alias set merged 'pr list --state merged --limit 20'

Alias a multi-flag pr list query

Bundles a full command with flags into the single word merged, so gh merged prints your last 20 merged PRs. Aliases that encode routine queries save keystrokes and enforce consistent flags. Overwrite an existing alias by adding --clobber.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.