How to search a keyword in github in a subfolder (and it’s subfolders) and only for a particular file extension?

  Kiến thức lập trình

I’m trying to search a keyword in a specific search path (together with its subpath), only limiting to specific file extension e.g. .ki

  • I know I can search for the specific search path using (learn from how to search a particular word or entry inside a sub folder in a repository on github)

    • https://github.com/myrepo/search?q=mykeyword+path:/mysearchpath
  • I know I can search for the specific search extention with (learn from How can I search all files ending with the file extension `.feature` on Github?)

    • https://github.com/myrepo/search?q=mykeyword+path:*.kt

But how can I combine them? I tried the following, all failed

  1. https://github.com/myrepo/search?q=mykeyword+path:/mysearchpath/*.kt (this can’t search the subfolder
  2. https://github.com/myrepo/search?q=mykeyword+path:/mysearchpath+path:*.kt

LEAVE A COMMENT