(Go: >> BACK << -|- >> HOME <<)

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude and absolute path as argument #1577

Open
Germano0 opened this issue Jun 25, 2024 · 2 comments
Open

exclude and absolute path as argument #1577

Germano0 opened this issue Jun 25, 2024 · 2 comments

Comments

@Germano0
Copy link

Hello, I have noticed that --exclude flag does not accept an absolute path as argument. Indeed

both commmands

$ pwd
/home/user
fd --hidden --exclude /home/user/beta kate
fd --hidden --exclude=/home/user/beta kate

were still searching /home/user/beta. I have noticed that because such path is a SSHFS remote mount and I could notice activity on such path.
To make sure fd was not searching inside such path I had to use the relative name

fd --hidden --exclude beta kate
fd --hidden --exclude=beta kate

I think it would be nice to be able to use absolute path too.
Thank your for your work on fd and have a nice day

@l-armstrong
Copy link

I'm new to the project, and would like to work on this feature request if it's still open.

@tmccombs
Copy link
Collaborator
tmccombs commented Jul 9, 2024

So the patrern passed to --exclude is interpreted similar to a gitignore pattern. That means that if it starts with a "/", then it is relative to the root search path.

So to support this, we would probably need a new option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants