Forward slash is special in .gitignore format, in that a trailing slash is stripped but means to only match directories, and the behavior of shell globs * ? and [] is changed if / is present.
Now to the point: In fd, --ignore-file patterns don't match subdirs. To ignore a dir1/file1.txt,
doesn't work. To make it work, replace / with * :
The first pattern does work for fd when placed into a .gitignore.
More fail cases:
Is supposed to match files recursively, does nothing, works in .gitignore.
Is supposed to match from the beginning of the pattern (so, sort of not what one would expect?), does nothing, works in .gitignore.
As a sub-case of the above, /* does not work (probably because / changes the behavior); /** and * do.
Forward slash is special in
.gitignoreformat, in that a trailing slash is stripped but means to only match directories, and the behavior of shell globs*?and[]is changed if/is present.Now to the point: In fd,
--ignore-filepatterns don't match subdirs. To ignore adir1/file1.txt,doesn't work. To make it work, replace
/with*:The first pattern does work for fd when placed into a
.gitignore.More fail cases:
Is supposed to match files recursively, does nothing, works in
.gitignore.Is supposed to match from the beginning of the pattern (so, sort of not what one would expect?), does nothing, works in
.gitignore.As a sub-case of the above,
/*does not work (probably because/changes the behavior);/**and*do.