your-tools / ruplacer

Find and replace text in source files
BSD 3-Clause "New" or "Revised" License
443 stars 25 forks source link

Option for path sorting? #91

Closed ErichDonGubler closed 2 years ago

ErichDonGubler commented 2 years ago

One thing that might be interesting for users: allow sorting of paths, which is useful for more deterministic output. walkdir allows results to be more strictly ordered, at the cost of (1) single-threading only, (2) some memory, and (3) latency for sorting. Suggested CLI: --sort-by=(file-name-natural|file-name|file-path|file-path-natural)

It's also pretty reasonable to not allow this -- if multiple paths were allowed, and it was guaranteed that paths would be visited in the order specified, then other shell commands can be used to provide an ordered list. This could also be complemented by being able to read a list of path arguments from a file.

dmerejkowsky commented 2 years ago

Sorry, you failed to convince me :stuck_out_tongue:

Closing, for now