eliben / pss

pss is a power-tool for searching inside source code files.
Other
327 stars 46 forks source link

Enhancement request: Support in-plce replace a-la sed #40

Closed adamatan closed 7 years ago

adamatan commented 7 years ago

I use pss extensively because I feel comfortable with Python's regex format, which I prefer over the one sed uses.

However, sed is extremely useful for recursive in-place regex replace.

Do you think it would be a good idea to add search-and-replace features to pss, using re.sub?

eliben commented 7 years ago

Nope, I never planned replacement features for pss because you could always xargs-combine it with sed. The design goal for pss is to be able to find source files easily without passing too many options to grep or find.

adamatan commented 7 years ago

Thanks. I'm using xargs extensively, but I have to re-write the regex in the sed format. Am I missing anything? Would you be open for a PR that implements the substitution, or would you prefer that I develop it separately?

adamatan commented 7 years ago

I've also asked if there's any workaround - Converting regular expression syntax from Python to POSIX

eliben commented 7 years ago

Feel free to develop it separately.

By the way, if the regexp conversion bothers you, you could use perl instead of sed