fd
fd copied to clipboard
[BUG] Passing `--ignore-vcs` after `--no-ignore-vcs` does not override it
Checks
- [x] I have read the troubleshooting section and still think this is a bug.
Describe the bug you encountered:
Given the following .gitignore file and example:
**/.DS_Store
local defaultArg=(--hidden --no-ignore-vcs --no-ignore-parent)
fd $arg --no-require-git --ignore-vcs '(store|container)'
# .DS_Store is returned in the results
Describe what you expected to happen:
I would expect it to override the previously specified flag[^1], given that --ignore-vcs is actually the default behavior and would otherwise not be useful to the user.
Also, the documentation states that it does override it: https://github.com/sharkdp/fd/blob/6dfbbe86fce4a49c6c93a025abd81da545dbbd17/src/cli.rs#L77-L79
[^1]: (namely - the exact opposing flag that it corresponds to)
What version of fd are you using?
fd 10.2.0
Which operating system / distribution are you on?
Darwin 23.6.0 arm64
I can't reproduce this with 10.3.0 on Linux.