Giter VIP home page Giter VIP logo

rgp's Introduction

ripgrep plus

rgp wraps ripgrep to add google like queries to patterns. You can now do queries like

$ rgp repo:myservice -file:test.go io.Writer case:yes

and it will search across all your local code. Just like sourcegraph, zoekt or chromium codesearch does.

Demo

asciicast

Installation

Ensure ripgrep is on your path https://github.com/BurntSushi/ripgrep#installation

# Install with go toolchain
go get github.com/keegancsmith/rgp

# Add to your .bashrc, for now just eval locally. These are folder roots
# contains clones of repos. Similiar to PATH or GOPATH, etc.
export SRCPATH=$HOME/src:$HOME/go/src

Future

This is an early release, so bugs, perf and code cleanliness will come.

I want to use this in my editor to quickly jump between projects, files, search results all from a unified interface. Initially this would likely be an emacs package (via ivy). But vscode would also be interesting to support.

Why

  • Why use google like patterns? I find it much more natural to build the pattern this way, vs having to jump around previous commands to insert the correct flags. This tool also provides tooling around quickly picking a repo to search / searching across multiple repos.

  • Why SRCPATH? Hopefully this can become a standard for other tooling to start using (any tool that needs to discover where you keep your code locally, eg IDEs). It follows the same pattern used by many other unix tools.

  • Why go? I am proficient in it. I'll likely learn some rust so it potentially better interoperates with ripgrep. Or I'll embed a go tool which is also fast at searching like pt.

rgp's People

Contributors

keegancsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.