Skip to content

gh search code --web returns zero matches and error #11029

@onnimonni

Description

@onnimonni

Describe the bug

Same query for gh search code should probably work both in terminal and web?

This works and returns examples:

$ gh search code --extension nix "karabiner-elements"

But when adding --web it doesn't show any results because extension doesn't work in web:

$ gh search code --extension nix "karabiner-elements" --web

Affected version

$ gh version
gh version 2.73.0 (nixpkgs)
https://github.com/cli/cli/releases/tag/v2.73.0

Steps to reproduce the behavior

  1. Type this:
gh search code --extension nix "karabiner-elements" --web
  1. It then opens this link: https://github.com/search?q=karabiner-elements+extension%3Anix&type=code
  2. Where I can see this error:
Image

Expected vs actual behavior

If the web search query would not use extension:nix but path:*.nix it would work correctly.

Metadata

Metadata

Labels

bugSomething isn't workinggh-searchrelating to the gh search commandp2Affects more than a few users but doesn't prevent core functions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions