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

Document and test current semantics of -w. #585

Merged
merged 2 commits into from
Feb 24, 2017
Merged

Conversation

epa
Copy link

@epa epa commented Dec 8, 2015

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.

@epa
Copy link
Author

epa commented Dec 8, 2015

Hooray, the tests pass. Let me know if you need anything else to merge this.

@epa
Copy link
Author

epa commented Jan 4, 2017

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.

@petdance petdance merged commit a0cbff6 into beyondgrep:dev Feb 24, 2017
@petdance
Copy link
Collaborator

petdance commented Feb 24, 2017

Merged. Thank you. #6ceb946

@epa
Copy link
Author

epa commented Feb 24, 2017

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.)

@petdance
Copy link
Collaborator

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.

@petdance
Copy link
Collaborator

See also 6ceb946

@epa
Copy link
Author

epa commented Feb 24, 2017

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.

@petdance
Copy link
Collaborator

Join the ack-dev list and when I start talking about the plans for ack 3.0, let's discuss there.

@epa
Copy link
Author

epa commented Feb 24, 2017

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)

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

Successfully merging this pull request may close these issues.

2 participants