npkill icon indicating copy to clipboard operation
npkill copied to clipboard

Allow moving folders to trash rather than completely deleting them

Open haykam821 opened this issue 5 years ago • 5 comments

Instead of rm-ing the folders when a delete is triggered, it would be helpful to have an option that trashes them instead such as --trash. This is much safer and reversible.

haykam821 avatar Dec 11 '19 17:12 haykam821

Nice idea!

Maybe even a key combination with Del to send them there. The only problem we see is that, as far as we know, the recycling bin is a graphic environment functionality. Therefore, does the recycling bin exist in servers? How would this be managed?

We raise these questions in case anyone reading this has a broader knowledge on the subject.

zaldih avatar Mar 31 '20 15:03 zaldih

trash works already on servers.

haykam821 avatar Mar 31 '20 16:03 haykam821

I'll take a look at integrating these two things together

Fleker avatar Oct 14 '21 15:10 Fleker

The Trash project is using some ESModule formatting which is making it infeasible to simply integrate this code. A lot of the library logic is relatively straightforward, but the dependencies themselves are ESModules so I got a bit stuck.

Fleker avatar Oct 14 '21 16:10 Fleker

Okay I think after reviewing a developer help guide and an open ts-node issue I'm on the right track. It does require some refactoring in this project, but I hope to have a PR ready soon.

Fleker avatar Oct 16 '21 17:10 Fleker