Skip to content

Commit ff4e4a2

Browse files
authored
Merge pull request cli#13756 from happysnaker/docs-search-qualifier-examples
docs(search): add examples for multiple qualifiers
2 parents b7195a5 + 0afaf6f commit ff4e4a2

5 files changed

Lines changed: 15 additions & 0 deletions

File tree

pkg/cmd/search/code/code.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ func NewCmdCode(f *cmdutil.Factory, runF func(*CodeOptions) error) *cobra.Comman
5656
# Search code matching "error handling"
5757
$ gh search code "error handling"
5858
59+
# Search code using raw search qualifiers as separate arguments
60+
$ gh search code panic path:pkg language:go
61+
5962
# Search code matching "deque" in Python files
6063
$ gh search code deque --language=python
6164

pkg/cmd/search/commits/commits.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ func NewCmdCommits(f *cmdutil.Factory, runF func(*CommitsOptions) error) *cobra.
5555
# Search commits matching phrase "bug fix"
5656
$ gh search commits "bug fix"
5757
58+
# Search commits using raw search qualifiers as separate arguments
59+
$ gh search commits fix author:monalisa merge:false
60+
5861
# Search commits committed by user "monalisa"
5962
$ gh search commits --committer=monalisa
6063

pkg/cmd/search/issues/issues.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ func NewCmdIssues(f *cmdutil.Factory, runF func(*shared.IssuesOptions) error) *c
5050
# Search issues matching phrase "broken feature"
5151
$ gh search issues "broken feature"
5252
53+
# Search issues using raw search qualifiers as separate arguments
54+
$ gh search issues label:bug author:monalisa state:open
55+
5356
# Search issues and pull requests in cli organization
5457
$ gh search issues --include-prs --owner=cli
5558

pkg/cmd/search/prs/prs.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ func NewCmdPrs(f *cmdutil.Factory, runF func(*shared.IssuesOptions) error) *cobr
5252
# Search draft pull requests in cli repository
5353
$ gh search prs --repo=cli/cli --draft
5454
55+
# Search pull requests using raw search qualifiers as separate arguments
56+
$ gh search prs is:merged author:monalisa
57+
5558
# Search open pull requests requesting your review
5659
$ gh search prs --review-requested=@me --state=open
5760

pkg/cmd/search/repos/repos.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ func NewCmdRepos(f *cmdutil.Factory, runF func(*ReposOptions) error) *cobra.Comm
5656
# Search repositories matching phrase "vim plugin"
5757
$ gh search repos "vim plugin"
5858
59+
# Search repositories using raw search qualifiers as separate arguments
60+
$ gh search repos topic:github 'stars:>5000'
61+
5962
# Search repositories public repos in the microsoft organization
6063
$ gh search repos --owner=microsoft --visibility=public
6164

0 commit comments

Comments
 (0)