sift icon indicating copy to clipboard operation
sift copied to clipboard

how to stop the search after found one match?

Open werdegars opened this issue 6 years ago • 2 comments

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

werdegars avatar Nov 28 '18 08:11 werdegars

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

svent avatar Nov 29 '18 23:11 svent

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

werdegars avatar Nov 30 '18 00:11 werdegars