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

Added support for filtering by multiple filetypes and extensions #205

Merged
merged 4 commits into from
Jan 1, 2018
Merged

Added support for filtering by multiple filetypes and extensions #205

merged 4 commits into from
Jan 1, 2018

Conversation

tkadur
Copy link
Contributor

@tkadur tkadur commented Dec 30, 2017

#177 #199

Changes

You can now specify multiple extension and file type filters by simply adding more -e or -t options, respectively, as was suggested in the above issues.

So, to find all files and symlinks with the extension .c or .h, you could run

fd -ec -eh -tf -tl

@sharkdp
Copy link
Owner

sharkdp commented Dec 31, 2017

@tkadur Welcome and thank you very much for your contribution!

It would be great if we could also:

  • Update the tests (add a tests for multiple file types and for multiple file extensions)
  • Update the long --help text (describe what happens if multiple options are specified)
  • Update the man page in the same way.

@sharkdp
Copy link
Owner

sharkdp commented Dec 31, 2017

Also, there seems to be a problem with additional pattern matching.

With this PR:

▶ touch test.txt
▶ fd -e txt foo
test.txt

Previously:

▶ fd -e txt foo

(no match)

@tkadur
Copy link
Contributor Author

tkadur commented Dec 31, 2017

Thanks!

I updated the help text and tests and also fixed the issue you mentioned. I'm not quite sure what you mean by updating the man page though.

@sharkdp sharkdp self-requested a review January 1, 2018 11:07
@sharkdp sharkdp merged commit faf934d into sharkdp:master Jan 1, 2018
@sharkdp sharkdp removed their request for review January 1, 2018 11:10
@sharkdp
Copy link
Owner

sharkdp commented Jan 1, 2018

Thank you very much!

The man page is the file in doc/fd.1 - I'll simply update this later before releasing the next version.

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

Successfully merging this pull request may close these issues.

2 participants