I write notes with nvALT and vim, I
always do search with terminal, but I had suffered that it’s hard to search
multiple words with
AND condition in a file. It’s easy to search in IDE.
I want a simple way to search multiple words in terminal.
I have googled on GitHub and StackOverflow but didn’t find a nice solution for the multiple word search. So I write a simple script to complete the work.
ripgrep with brew
brew install ripgrep
The ripgrep is best at searching with fast speed and highlighted words, I write the script base on
curl -O https://raw.githubusercontent.com/objczl/hacker-scripts/master/search.sh chmod +x search.sh
search.sh hello world