Skip to content

gh search prs messing query with flags and raising "unknown shorthand flag: 'l' in -label:some-label" #10467

@rrebollo

Description

@rrebollo

Describe the bug

gh help states queries built with GitHub search syntax are supported but it looks like gh is messing query with flags and raising unknown shorthand flag: 'l' in -label:some-label

Affected version

2.67.0

Steps to reproduce the behavior

  1. Type this:
    gh search prs org:OCA -label:approved state:open --sort=created --order=asc
  2. View the output
    `unknown shorthand flag: 'l' in -label:approved

Expected vs actual behavior

I was hopping default output for search results

Findings

I don't get any logs when setting GH_DEBUG. gh help states gh search prs [<query>] [flags] as general structure for calls so gh is misleadingly recognizing -label as flag instead as query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-searchrelating to the gh search command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions