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

List command waits for entire archive to be processed before outputting anything #212

Closed
AntonHermann opened this issue Nov 23, 2021 · 2 comments · Fixed by #225
Closed
Labels
enhancement New feature or request

Comments

@AntonHermann
Copy link
Contributor

Currently the list command reads the whole archive into a Vec before outputting anything, thus for big archives a long time nothing is printed at all

Expected behavior

  • when running without --tree: print each file as soon as it's processed
  • when running with --tree: show a progress indication ("reading files..." or "reading files: XX%") while files are read

Implementation suggestions

  • when running without --tree: instead of returning a Vec from archive::{tar,zip}::list_archive, maybe we can return an iterator or similar instead?
  • when running with -tree: gray text which is deleted as soon as output is ready would look nice I guess
@AntonHermann AntonHermann added the enhancement New feature or request label Nov 23, 2021
@marcospb19
Copy link
Member

Like the idea.

But what happens with text that is deleted afterwards when the output is redirected to another file? Does it break anything? If so, I think that a [INFO] call would be better.

@AntonHermann
Copy link
Contributor Author

Good question, I'll try to figure out how that is handled and how other CLI programs that rewrite their output handle this case

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

Successfully merging a pull request may close this issue.

2 participants