Giter VIP home page Giter VIP logo

Comments (8)

andreafrancia avatar andreafrancia commented on July 3, 2024 1

From the 0.21.5.25 release trash-put honors the -i option.
Example:

$ touch foo
$ trash-put -i foo
trash-put: trash regular empty file 'foo'? y
$ 

You can add alias trash-put='trash-put -i' to your .bashrc

from trash-cli.

Ganton avatar Ganton commented on July 3, 2024 1

For example, with the new improvement users can execute

    trash -i *

and select which files are not going to be deleted.

Thanks, Andrea!

from trash-cli.

andreafrancia avatar andreafrancia commented on July 3, 2024

Thank you for your feedback. Could you explain a bit more why it would be useful? The unix utility rm does support '-i' because there is no (easy) way of recovering from errors. This is not the case of trash-put.

from trash-cli.

goodevilgenius avatar goodevilgenius commented on July 3, 2024

I can see this being useful in a command like trash-put -i * to be sure you're not accidentally removing a file that's needed. Sure, you can easily restore a file, but what about a file that's in use, but for whatever reason, wasn't properly locked. Moving it to the trash could have very undesirable effects on the operation of the program using it.

Also, when you think about it, that's already the default behavior in most file managers, and trash-put is intended to be a command-line replacement. So, it should be able (even optionally) to mimic the behavior of the same command in the file managers.

from trash-cli.

michaelaoash avatar michaelaoash commented on July 3, 2024

I would also like the interactive option for trash-put. For example, I will often want to delete the .log, .aux, and backup of a LaTeX run but to retain the input .tex and output .pdf files. trash-put my-tex-file.* gets rid of everything; it would be much better to be prompted. Thank you for your consideration.

from trash-cli.

andreafrancia avatar andreafrancia commented on July 3, 2024

Patch welcome.

from trash-cli.

Ganton avatar Ganton commented on July 3, 2024

Hi, I have similar problems.

Andrea wrote:

Patch welcome.

so could this issue be reopened so that people are able to know that this issue exists (and submit that patch)?

from trash-cli.

laggardkernel avatar laggardkernel commented on July 3, 2024

From the 0.21.5.25 release trash-put honors the -i option.

@andreafrancia Thanks for your work. But the current -i corresponds to --interactive=always, can we get -I --interactive=once? The latter only requires 1 prompt for a batch deletion.

from trash-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.