https://github.com/healeycodes/drep
🗃️ A fast grep clone written with Deno.
https://github.com/healeycodes/drep
deno file-search grep workers
Last synced: about 1 year ago
JSON representation
🗃️ A fast grep clone written with Deno.
- Host: GitHub
- URL: https://github.com/healeycodes/drep
- Owner: healeycodes
- Created: 2023-04-10T21:02:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-11T07:16:27.000Z (almost 3 years ago)
- Last Synced: 2024-10-05T17:43:17.017Z (over 1 year ago)
- Topics: deno, file-search, grep, workers
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# drep
drep is a basic clone of `grep` (or more accurately, `rgrep`) written in Deno with no third-party dependencies. It uses workers to search files in separate threads, making it faster than standard `grep` (but not faster than other modern versions like `ripgrep`).
## Use it
To use drep, you can run the following commands:
`drep "some string" file_or_folder`: Search for a string in a file or folder.
`cat some_file.txt | drep "some string"`: Search for a string in stdin.
`drep "some string" .`: Search for a string in the current directory.
Searches are recursive by default.
You can also pass a valid JavaScript RegExp instead of a search string.
### Flags
`-n`: Include line numbers in the search results.
`-i`: Perform a case-insensitive search.
## Building and Testing
To build drep, run `bash build.sh` to create a binary at `./drep`.
To run the tests, use the following command: `deno test -A`.
## Contributing
If you'd like to contribute to drep, please follow these guidelines:
- Before submitting a pull request, please create an issue describing the change you'd like to make.
- Make sure your code follows the existing style and conventions.
- Write tests for your changes.
- Run the tests and make sure they pass.
- Submit a pull request and await feedback from me!