/chibigrep/README.md

https://github.com/rhysd/misc · Markdown · 31 lines · 21 code · 10 blank · 0 comment · 0 complexity · 9874abee048861b66dcff2ab425b1b92 MD5 · raw file

  1. A minimal example for [ripgrep](https://github.com/BurntSushi/ripgrep) as a library for [Rust LT Online 5](https://rust.connpass.com/event/228732/).
  2. ## Build
  3. ```
  4. cargo build --release
  5. cp ./target/release/chibigrep /usr/local/bin/
  6. ```
  7. ## Usage
  8. ```
  9. chibigrep pattern [path...]
  10. ```
  11. ## Example
  12. ```sh
  13. # Search \w+ in all test.txt
  14. chibigrep '\w+' ./test.txt
  15. # Search \w+ in all files in ./dir1 and ./dir2 recursively
  16. chibigrep '\w+' ./dir1 ./dir2
  17. # Search \w+ in all files in the current directory recursively
  18. chibigrep '\w+'
  19. ```
  20. ## License
  21. Public domain.