-
Notifications
You must be signed in to change notification settings - Fork 321
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
Visualize progress of potentially longer operations #61
Comments
@dumblob This is something I'm really missing from ranger. Two separate things we need is to do operations asynchronously and add a progress bar. First one may not be difficult but I don't have an idea how to tackle on the second one yet. Currently there is no file copying function provided in go standard library since portability is not very easy to achieve: https://go-review.googlesource.com/#/c/1591/ I try to avoid implementing it in lf for the same reason. That's why lf uses Another possibility is to customize |
Well, there is a half-way solution I would say. Namely the trick as used by progress. This should work on most systems unless they don't provide file descriptor information anywhere independently. On these "problematic" systems this feature would be simply substituted by changing the status message to Copying in progress... (no worries, any errors are reported ASAP) and corresponding Copying successfully done. |
No, Python's stdlib does not include any way to do this. Ranger has implemented its' own set of functions, which The |
I'm aware of the portability issue (that's why I called it a half-way solution). We could also step aside and just implement a tiny wrapper for a user-defined command to show progress (and do the desired operation), so that user can decide himself, whether he'll use e.g. |
Sorry for late response. @KenjiTakahashi thanks for the direct link for ranger's copy functions. Instead of using half portable solutions as in In the meantime, I have been trying something along the line (which does not work yet):
This seems to work as I expected when I paste this in a shell with a hand written
This approach have the following advantages/disadvantages:
For the last point I think we can add a builtin command such as |
@gokcehan I'm fine with the "write your own copy/move/... function" solution. Once |
I have now added builtin copy and move operations with progress bars which is available in |
Currently
lf
does not show any feedback for pasting a copy or similar operations. This gets frustrating especially in situations when the files/directories are on a remote storage or any other less reliable storage (USB flash drives, etc.) and one doesn't know whether the operation progresses normally or not.E.g. copying even a small files takes time which freezes
lf
and the user does not know what's the reason (it might be a timed-out connection of the remote drive, it might be just a big file, it might belf
getting stuck because of bug, etc.).Could you please add some progress indication (either something like a very simple "modal" dialog in the form of a red progress bar overlapping the status bar and showing percentage or even a job queue view independent from the main process)?
The text was updated successfully, but these errors were encountered: