svent / sift

A fast and powerful alternative to grep
https://sift-tool.org
GNU General Public License v3.0
1.6k stars 108 forks source link

how to stop the search after found one match? #103

Open werdegars opened 5 years ago

werdegars commented 5 years ago

i have been searching this answer and can not find the way to do it what i mean, i do not want sift to continue searching next files, after getting the first match i thought by using --limit=1 will work, but apperently its still running to find next matching string

svent commented 5 years ago

There is currently no option for this specific use case. You could use "head" as a workaround if you are on Linux: sift --limit 1 pattern | head -n1

werdegars commented 5 years ago

i tried it but not working, its still keep searching, because it delay about 3-4 seconds after first match i assumed it still running to complete the search