-
Notifications
You must be signed in to change notification settings - Fork 140
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
Document and test current semantics of -w. #585
Conversation
Hooray, the tests pass. Let me know if you need anything else to merge this. |
Could I ask you to have another look at this merge request please? It is just tests and documentation, so should be safe to merge. |
Merged. Thank you. #6ceb946 |
Thanks for merging this. Would you like to discuss the possible change to the -w semantics to make them more like those used by grep? (I asked on the mailing list about the change but as I recall there was no response.) |
If we were to change -w's semantics it would need to be in ack 3.0. Fortunately, I'm considering ack 3.0. You may want to sign up for the ack-dev mailing list. |
See also 6ceb946 |
Would you consider a -W flag that matches whole words without the subtleties of checking the first and last characters of the regexp? For me personally the current -w is something of a weakness in ack if it is to be a replacement for grep. |
Join the ack-dev list and when I start talking about the plans for ack 3.0, let's discuss there. |
I meant, as a way to incorporate the bug fix (as I see it) in a stable release. The semantics of -w were changed with af21f7d in 2014, which did not require a new major version for the change. If you don't want to either change -w or add -W to ack2 then I will continue to carry it as a local patch. That would seem at odds with the guiding principle of "what would grep do". (I'll join ack-dev too) |
As discussed in #558, this patch does not change any behaviour, but more clearly documents the current semantics of the -w flag and adds some tests for it.
If you can merge this, I will then send a separate pull request suggesting to change the -w semantics to something more useful, and updating the tests and documentation accordingly.