sayanarijit / xplr

A hackable, minimal, fast TUI file explorer
https://xplr.dev
MIT License
4.08k stars 74 forks source link

[Feature request] Improve copying / moving files UX #615

Closed freijon closed 1 year ago

freijon commented 1 year ago

I think xplr is lacking a bit in terms of UX when copying / moving files. When copying a file to a location where a file with the same name already esists, xplr creates a file named <name> (copied)

The perfect UX (in my opinion) is provided by vifm. They offer for each file the following options in a prompt: image

It would be nice to have something similar for xplr

Also it would be nice to see some kind of progress when copying a lot of data. Today we see which file is currently being copied but an ETA or progress bar would be nice. It could also be a plugin if this is too heavy for ootb xplr.

sayanarijit commented 1 year ago

Thanks for the feedback. I'd go for a plugin first. We may not be able to display a fancy UI like this, but it seems possible to implement in a simple bash script with select.

Here's the copy logic: https://github.com/sayanarijit/xplr/blob/8aff0ba9185076b0a2ee92d43c2abfea2802b174/src/init.lua#L1482-L1502

freijon commented 1 year ago

I know very little to nothing about how xplr works internally, but maybe it's worth considering implementing some kind of copy / move functionality into the core of xplr (in Rust?), because you could argue that copying/moving files is also a core feature of a file manager. This in term would maybe also allow for a 'fancy UI'. But as I said, I don't know about how things work behind the curtain ;)

sayanarijit commented 1 year ago

Actually, xplr has never been a "File Manager". It's an explorer at core, providing us with a framework and some tools to implement file management capabilities ourselves. The built-in init.lua serves more as an example rather than core to help us understand how it works, and integrate with other tools, like cp, rsync --progress, xcp etc. countless tools that are dedicated to just copying files.

sayanarijit commented 1 year ago

Closing this...

sayanarijit commented 1 year ago

Reopening to implement try a simple prompting approach...