mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #557] [feat request] option to ignore/include files using rsync-filter syntax #241
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @renatocoutinho on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/bootandy/dust/issues/557
The idea is to add the ability to pass "-F .rsync-filter" and have it ignore the files inside (using rsync's syntax). The rsync syntax could probably be rewritten as a big (set of) regex.
Reasoning: I often use dust prior to backing up messy directories with rsync, and exclude some files/dirs using rsync filters, then I re-run dust excluding all those files/dirs by hand - if dust had this feature, the process would be a lot easier.
rsync does something more complicated with only "-F" which is to recursively check for .rsync-filter in every sub-folder, that does look more complicated to implement.
@bootandy commented on GitHub (Feb 21, 2026):
Can you make this work with the existing above flag -I ?
-I is like -v only it will take a file which can contain multiple regex.
Or perhaps you want to use
-v "\.rsync-filter- which will ignore files in the .rsync-filter directory.@renatocoutinho commented on GitHub (Feb 21, 2026):
No, the syntax is quite different. For instance, to exclude a folder
fooin the top dir with rsync-filter I useand this is not recognized by dust. I could try and change this to just
but now this excludes any files or folder that contain "foo" in the name, and something like
doesn't work at all! (by the way, this doesn't work even with -v on the command line, I think this is probably a bug? Will re-read docs and search for issues before filling a new issue later)