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] Finding all images in nested directories #49

Closed
gurgalex opened this issue May 15, 2019 · 5 comments
Closed

[Feature request] Finding all images in nested directories #49

gurgalex opened this issue May 15, 2019 · 5 comments

Comments

@gurgalex
Copy link
Collaborator

gurgalex commented May 15, 2019

Problem

Unable to view files existing at multiple levels in a nested directory.

Desired Behavior

Viewing of all the images listed.

# File tree of Pictures folder
image.png
dir1/image.png
dir1/depth2/image.png
dir1/depth2_2/image.png

Syntax

Is there a syntax to express that all images of certain types should be searched for up to a certain directory depth?

pseudo syntax
riv -f Pictures/**[*.png]/**[*.png]/*.png

Expected behavior

Find all images of type png in base Pictures folder.
Inside any directories in Pictures, find any png files.
Inside any sub-sub directories of Pictures find any png files.

Thoughts?

@Davejkane
Copy link
Owner

I'm not sure I understand. I'm pretty sure on zsh if I do riv **/*.png I get this behaviour. As for limiting the depth, this probably something that should be done by the shell. At runtime it's a different story, and I'll see if I can take it into account in #40. I'm not sure how to do this in bash.

@gurgalex
Copy link
Collaborator Author

Tested on zsh and it has the expected behavior. (4 of 4 images)

Bash shell only showed.

dir1/image.png

Closing as it is shell specific.

@gurgalex
Copy link
Collaborator Author

Hmm, may be a reason to bring back quoting globs.

riv "**/*.png" would have the same result regardless of shell expansion support (plus if a user has say 10k files and possibly reaches the max supported cli arguments for a program).

https://docs.rs/shellexpand/1.0.0/

@gurgalex
Copy link
Collaborator Author

Closed in favor of #50

@Davejkane
Copy link
Owner

Yeah, I think I agree with you on this. Especially after doing a little bit of reading about bash. Also, I'll need this to take care of #40 anyway. Please close this issue anyway and I'll take care of it in that branch. Although I think it's going to be a nightmare coz I don't think that library you've linked does glob expansions.

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

No branches or pull requests

2 participants