Giter Site home page Giter Site logo

gret's Introduction

gret

gret (Global Regular Expression Tree) is a command-line utility designed to search through directories and files for a regex expression that matches while respecting .gitignore and .ignore files, the results are presented in a tree format and a menu can be spawned to select from.

demo.mp4

Quick Install

cargo install gret

To Run

Use cargo run, the first positional argument is the pattern, the second is the path to search. If you want to match multiple patterns use -e followed by the pattern.

To launch a menu use the flag -m or --menu, this will open a match picker. After selecting one by pression enter the file/directory will be launched by $EDITOR if on unix or start if on windows. If $EDITOR is not found, then open will be called on macos and xdg-open will be called on other non-windows operating systems.

How To Use

See the options.md file.

To Install

cargo install gret

or

Run the ./add_to_path.sh script after changing the links location to somewhere on your path. Or run the commands seperately:

cargo build --release

And then source the correct completion file that is in the completions/ directory.

To Benchmark

Run ./benchmarks/bench at the root directory. Results can be seen in the times file in the benchmarks directory.

Then add the binary to your path and then source the script to give you proper completions. For the completions to work on next login you must source it at each login.

Shell Completion Script to Source
BASH completions/gret.bash
Zsh completions/_gret
Fish completions/gret.fish
Elvish completions/gret.elv
PowerShell _gret.ps1

gret's People

Contributors

4imothy avatar forgottenmaster 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.