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

Implement ":replace" filter #766

Merged

Conversation

christian-schilling
Copy link
Member

Allows replacement inside of files using a regular expression.

@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/regex-replace branch 6 times, most recently from 75c253a to b2e01af Compare June 16, 2022 13:09
@@ -62,6 +62,9 @@ The resulting tree will contain the contents of the
workspace root as well as additional files specifed in the ``workspace.josh`` file.
(see [Workspaces](./workspace.md))

### Text replacement **`:replace="regex","replacement"`
Applies the supplied regular expression to every file in the input tree.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a note/warning that this isn't reversible is needed. Maybe with a short explanation what "reversible" means (which means you won't be able to push any commits to a filtered tree or something like that)

src/filter/tree.rs Outdated Show resolved Hide resolved
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/regex-replace branch 10 times, most recently from ca6cc62 to 1741342 Compare June 24, 2022 20:27
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/regex-replace branch 11 times, most recently from 02e6bd2 to 1bf42fd Compare July 6, 2022 14:59
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/regex-replace branch 23 times, most recently from 6456a41 to 84c02d7 Compare August 30, 2022 11:37
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/regex-replace branch from 84c02d7 to 91f11a7 Compare September 19, 2022 08:41
Allows replacement inside of files using a regular expression.

Change-Id: regex-replace
@christian-schilling christian-schilling force-pushed the @changes/master/christian.schilling.de@gmail.com/regex-replace branch from 91f11a7 to 0fcc85a Compare September 20, 2022 12:14
@LMG LMG merged commit 6740216 into master Sep 20, 2022
@LMG LMG deleted the @changes/master/christian.schilling.de@gmail.com/regex-replace branch September 20, 2022 12:38
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