App-Rak icon indicating copy to clipboard operation
App-Rak copied to clipboard

Multiline replace

Open greenfork opened this issue 1 year ago • 3 comments

Thank you for this awesome binary!

I have a use case to perform multiline replacements in code, here is an example. For this file text.txt:

Multi

line

I can do matching with rak --per-file '/Multi\n\nline/' text.txt but I can't also specify the --modify-files option because it complains:

Can only have one action at a time: '--modify-files' was specified before '--per-file'

Are there any hard-blockers to implement multiline replacement or someone just needs to implement it?

greenfork avatar Aug 12 '24 09:08 greenfork

Thanks for he report!

I'll see I can get this into the next release. On which I will be working after getting this week's Rakudo Weekly News out of the door today :-)

lizmat avatar Aug 12 '24 09:08 lizmat

Meh, looks like this needs a re-think of the way --per-line and --per-file work. So I doubt a fix for this will be seen today. Sorry.

lizmat avatar Aug 12 '24 14:08 lizmat

Sure, thank for looking into it! My problem is solved by manual labor :( no rush for me right now :^)

greenfork avatar Aug 12 '24 14:08 greenfork

Release 0.3.5 fixes this issue.

Thanks again for reporting!

lizmat avatar Aug 17 '24 20:08 lizmat