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

Improve #12920 fix #13958

Merged
merged 1 commit into from
Apr 12, 2020
Merged

Improve #12920 fix #13958

merged 1 commit into from
Apr 12, 2020

Conversation

genotrance
Copy link
Contributor

After #12779, nimgrep skipped newline after printing last match of each filename if --filenames. Original fix in #12920 was in the wrong spot and only addressed issue if a single match. This is a better solution since it covers any number of matches.

This needs to be backported to 1.2.0, is working correctly in 1.0.6 since #12779 wasn't ported there.

Before:

PS C:\Users\IEUser\Desktop\DL\programming\nimbass> nimgrep --filenames --recursive --oneline ".*[\\/](lib)?bass_fx[_-]?(static)?[0-9.\-]*\.dll$" C:\Users\IEUser\nimcache\nimterop\nimbassfx
C:\Users\IEUser\nimcache\nimterop\nimbassfx\bass_fx.dll:1: C:\Users\IEUser\nimcache\nimterop\nimbassfx\bass_fx.dllC:\Users\IEUser\nimcache\nimterop\nimbassfx\x64\bass_fx.dll:1: C:\Users\IEUser\nimcache\nimterop\nimbassfx\x64\bass_fx.dll2 matches

After:

> nimgrep --filenames --recursive --oneline ".*[\\/](lib)?bass_fx[_-]?(static)?[0-9.\-]*\.dll$" C:\Users\IEUser\nimcache\nimterop\nimbassfx
C:\Users\IEUser\nimcache\nimterop\nimbassfx\bass_fx.dll:1: C:\Users\IEUser\nimcache\nimterop\nimbassfx\bass_fx.dll
C:\Users\IEUser\nimcache\nimterop\nimbassfx\x64\bass_fx.dll:1: C:\Users\IEUser\nimcache\nimterop\nimbassfx\x64\bass_fx.dll
2 matches

@Araq
Copy link
Member

Araq commented Apr 12, 2020

Irrelevant CI failure, merging.

@Araq Araq merged commit 35b0463 into nim-lang:devel Apr 12, 2020
@genotrance
Copy link
Contributor Author

@narimiran - needs to be backported to 1.2.0.

narimiran pushed a commit that referenced this pull request Apr 28, 2020
(cherry picked from commit 35b0463)
@narimiran
Copy link
Member

@narimiran - needs to be backported to 1.2.0.

Thanks for the ping! Backported.

@genotrance genotrance mentioned this pull request Oct 4, 2020
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.

3 participants