You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
okay, so, if I have a folder with a bunch of predictable notes, logically I'd use "exclude", right?
this is slightly unrelated and more nuanced than #865 which deals with how the library in burntsushi parses excludes, which, okay it's buggy.
let's start where fd does work:
fd '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' path/to/folder finds the predictable ones I don't want, works correctly.
remember, the goal here is to get things in that folder that don't match. let's explore it!
fd -E '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' path/to/folder complains about path/to/folder because it thinks it's a search pattern (this is the logical way to run this search, according to your readme)
fd -E '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' . path/to/folder lists all files (because it takes the dot as a pattern) (an attempted fix based off what your error message suggests for the "find all" pattern, which means that exclude is a recessive trait compared to the dominant "find all", such that mixing excludes and patterns is probably undefined behavior, and the error message should just tell you to not do it)
(yes, I tried it both ways, hoping this was a weird order of operations problem that you'll see further down) fd . -E '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' path/to/folder
FYI, the non-exclude case (fd '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' . path/to/folder) isn't much better, it searches both . (e.g., PWD/CWD) and path/to/folder (treats . as a folder) - which has to do with it suddenly thinking . is a path and not a pattern, because I already provided a first one - which kinda tells me that the "you should use the . pattern" guidance in that error message is flawed in more cases than expected
the search would proceed as expected if I moved the current directory to the location I specified in the path option
which begs two questions:
A) why doesn't fd just change CWD to resolve this buggy exclude behavior
B) why did I make this issue offering you the chance to improve this software instead of moving into the directory myself in the script
The text was updated successfully, but these errors were encountered:
fd 8.3.1
okay, so, if I have a folder with a bunch of predictable notes, logically I'd use "exclude", right?
this is slightly unrelated and more nuanced than #865 which deals with how the library in burntsushi parses excludes, which, okay it's buggy.
let's start where fd does work:
fd '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' path/to/folder
finds the predictable ones I don't want, works correctly.remember, the goal here is to get things in that folder that don't match. let's explore it!
fd -E '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' path/to/folder
complains about path/to/folder because it thinks it's a search pattern (this is the logical way to run this search, according to your readme)fd -E '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' . path/to/folder
lists all files (because it takes the dot as a pattern) (an attempted fix based off what your error message suggests for the "find all" pattern, which means that exclude is a recessive trait compared to the dominant "find all", such that mixing excludes and patterns is probably undefined behavior, and the error message should just tell you to not do it)(yes, I tried it both ways, hoping this was a weird order of operations problem that you'll see further down)
fd . -E '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' path/to/folder
FYI, the non-exclude case (
fd '([0-9]{2})-([0-9]{2})-([0-9]{2}).md' . path/to/folder
) isn't much better, it searches both . (e.g., PWD/CWD) and path/to/folder (treats . as a folder) - which has to do with it suddenly thinking . is a path and not a pattern, because I already provided a first one - which kinda tells me that the "you should use the . pattern" guidance in that error message is flawed in more cases than expectedthe search would proceed as expected if I moved the current directory to the location I specified in the path option
which begs two questions:
A) why doesn't fd just change CWD to resolve this buggy exclude behavior
B) why did I make this issue offering you the chance to improve this software instead of moving into the directory myself in the script
The text was updated successfully, but these errors were encountered: