“Much more than grep” — Visual Studio Magazine
GitHub Previews Improved code search: “Much more than grep”
GitHub invites developers to participate in a Technology Preview of Enhanced Code Search, which it describes as “much more than grep,” the Linux command-line search utility.
The project has its own website and a temporary interface separate from GitHub.com, although functionality may be integrated later into IDEs and code editors, with GitHub asking developers which tools would make good candidates for integration.
One aspect of the project is improving the search syntax, which differs from the usual GitHub.com search syntax with the introduction of new operators for searching regular expressions and symbols.
Features highlighted by the Microsoft-owned development platform include:
- Easily find what you’re looking for among the top results, with smart ranking and a code-optimized index.
- Search for an exact string, with support for substring matches and special characters, or use regular expressions (included in
- Expand your search with
repo: qualifiers, with auto-completion suggestions in the search field.
- Refine your results using filters such as
extension:and Boolean operators (
NOT). Look up definitions of a symbol with
- Get your cues quickly with additional features, like a directory tree, symbol information for the active staff, jump to definition, selection for search, and more!
Access to the Technology Preview is limited and developers can request to be waitlisted here.
Going forward, GitHub plans to experiment with scoring and ranking heuristics to find the best approach, explore the most potentially impactful APIs and integrations, and add support for more languages to language-specific features.
“For code search, our vision is to help every developer find, discover, navigate and understand code quickly and intuitively,” the company said. “GitHub Code Search puts the world’s code at your fingertips: everything is searchable. It helps you maintain a state of flux by showing you the most relevant results first and helping you with the auto-completion at every step.And once you’re on a results page, the rich navigation experience is optimized for reading and understanding code, allowing you to quickly make sense of unfamiliar logic, even for code in outside of your IDE.”
David Ramel is an editor and writer for Converge360.