fd icon indicating copy to clipboard operation
fd copied to clipboard

[BUG] Passing `--ignore-vcs` after `--no-ignore-vcs` does not override it

Open 5HT2 opened this issue 5 months ago • 1 comments

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

5HT2 avatar Jul 25 '25 20:07 5HT2

I can't reproduce this with 10.3.0 on Linux.

tmccombs avatar Nov 23 '25 07:11 tmccombs