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

(Feature request) Support extensions with multiple suffixes #214

Closed
althonos opened this issue Jan 8, 2018 · 2 comments
Closed

(Feature request) Support extensions with multiple suffixes #214

althonos opened this issue Jan 8, 2018 · 2 comments

Comments

@althonos
Copy link
Contributor

althonos commented Jan 8, 2018

Hi there,
currently, fd does not support extensions with multiple suffixes in them, like tar.gz and the like. Of course, one could simply run fd tar.gz, but unfortunately this will also find some other files (such as *.tar.gz.sig). The correct workaround would be fd tar.gz\$, which starts to get cumbersome !

I could probably have a look at the code myself, since I don't think this should be too complicated to implement, but I'd like to have your opinion about it.

@sharkdp
Copy link
Owner

sharkdp commented Jan 8, 2018

I would have actually needed this just yesterday. Completely agreed, this would be nice to have.

I think it's not completely trivial to implement this because we currently extract the extension via
Path::extension - which just extracts everything after the final . - and match that against the pattern. I guess we would have to resort to something like str::ends_with.

@sharkdp
Copy link
Owner

sharkdp commented Feb 10, 2018

Closed via #215.

@sharkdp sharkdp closed this as completed Feb 10, 2018
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

2 participants