Comments (4)
You may want to try sad - it's a bit different from ruplacer, but you may prefer it
from ruplacer.
Not sure I understand what you want. fzf can only select one candidate from a list of lines, no?
Can you give me more details?
from ruplacer.
No fzf can select multiple choices with the -m
option.
The idea it to select a subset of the proposed patches. If you are a vim user, the idea is a bit like as using the c
(confirm) option when doing a search an replace : s/old/new/c
. But implemented differently ( with a selector like fzf )
Let's say I want to replace my old
variable with new
. But I also have word like behold
oldish
and Freeholder
that also match the old
regex. I dont want to bother finding a complex regex that will only match my old
variable, I just want to select on the fly the right patches.
from ruplacer.
Maybe an interesting feature that could solve this is the following two options:
--writes-patches-to-folder
that put all the patches into a folder, one patch per file. The use would be
ruplacer old new . --writes-patches-to-folder /tmp/mypatches
Now it is possible manually ( or with a fzf script ) to remove the unwanted replacement in the /tmp/mypatches folder.
And then a second option --apply-from-folder
that could be using instead of the regex for the --go
option:
ruplacer --go --apply-from-foler /tmp/mypatches
Actually I don't think I would have to ruplacer for this part. It could be done simply with the patch
command. So I guess only the first feature would be interesting heh
from ruplacer.
Related Issues (20)
- Argument `--type-list` requires other arguments
- Tool seems to try to (re)write files that don't contain matches
- Error: nothing found to replace when no match found HOT 2
- --rename feature for editing file names HOT 1
- Recursive abuse
- Feature request: allow for replacement in normally ignored files HOT 1
- Tests suite fails on macOS HOT 4
- Possible wrong implementation of --ignored flag HOT 1
- Error: nothing found to replace HOT 1
- Replacement with empty string HOT 2
- Support multiline replace HOT 1
- Question: Is there a tool as handy as Ruplacer, but for file renames? HOT 3
- Outdated version in brew HOT 5
- `--ignored` seems not to work HOT 3
- Feature request : add 'quiet' option HOT 5
- Option for path sorting? HOT 1
- Expose case-insensitive processing of `ignore` files? HOT 1
- Shell completion HOT 3
- Use capturing group next to literal HOT 2
- Support file renames HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruplacer.