Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
werdegars opened this issue Nov 28, 2018 · 2 comments
Open

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

werdegars opened this issue Nov 28, 2018 · 2 comments

Comments

@werdegars
Copy link

werdegars commented Nov 28, 2018

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
Copy link
Owner

svent commented Nov 29, 2018

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants