rclone / rclone

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
https://rclone.org
MIT License
47.24k stars 4.22k forks source link

ncdu needs a "refresh" key #2174

Closed barkofdelight closed 6 years ago

barkofdelight commented 6 years ago

When using rclone ncdu, any extra output messes up the screen. E.g., one of those “Your browser didn’t send a complete request” messages (or perhaps from some other process running in the same terminal session). It would be nice to have a “refresh” key (perhaps Control+R or L?)

ncw commented 6 years ago

If you want to have a go at this @barkofdelight then first set up a go dev environment - make sure you've either set GOPATH or are happy to use ~/go/ as the go dev environment.

go get -u github.com/ncw/rclone will install the rclone source in ~/go/src/github.com/ncw/rclone.

You'll need to edit cmd/ncdu/ncdu.go. You'll find the keyboard handling loop easily enough. You'll then need to force a complete redraw somehow - take a look in the termbox docs.

Add the code, update the docs and you are good to go! (The UI for ncdu doesn't have tests alas)

barkofdelight commented 6 years ago

Ok, all went as expected. And yes, it's just one line of code and a couple of lines of documentation.

Now I suppose I fork in order to commit? Or just commit to a branch?

Thanks.

ncw commented 6 years ago

The usual thing would be to commit to a branch locally, then fork the rclone project in github, add a git remote pointing to that forked repository, push the branch to your fork on github then click the pull request button on the web site.

That was a super quick overview - let me know if you need more help!

barkofdelight commented 6 years ago

Ok, it all seemed to work. Your contributing guidelines are nicely written!

ncw commented 6 years ago

Ok, it all seemed to work. Your contributing guidelines are nicely written!

Thank you!

This will be in the latest beta now - thank you very much for your contribution :-)