Giter VIP home page Giter VIP logo

Comments (11)

senft avatar senft commented on July 21, 2024 7

I think it would be much more flexible, to allow users to enter multiple indices at once. Some programs allow that by entering 1-3 7 10-12, which would be parsed to [1,2,3,7,10,11,12].

from trash-cli.

et304383 avatar et304383 commented on July 21, 2024 7

Why doesn't it just take a * to restore all files?

from trash-cli.

andreafrancia avatar andreafrancia commented on July 21, 2024 4

while ( echo '0' | trash-restore ) ; do true; done;

from trash-cli.

krompus avatar krompus commented on July 21, 2024 1

Awesome; thanks!

This works perfectly for the issue described above, in that it only functions on the pwd. Would there happen to be a command to restore all files regardless of directory?

from trash-cli.

andreafrancia avatar andreafrancia commented on July 21, 2024 1

@Archie-2021

Is there a update on this? I think the ability to choose an array of indexes is a nice option to have instead of just choosing one.

This is already implemented:

Restore multiple trashed files separated by ',', also support range::

$ trash-restore
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
What file to restore [0..3]: 0-2, 3
$ ls foo bar bar2 foo2
foo bar bar2 foo2

from trash-cli.

andreafrancia avatar andreafrancia commented on July 21, 2024

I never tested it, please use caution:

(cd / && while ( echo '0' | trash-restore ) ; do true; done; )

from trash-cli.

krompus avatar krompus commented on July 21, 2024

Thanks again!

from trash-cli.

Archie-2021 avatar Archie-2021 commented on July 21, 2024

Is there a update on this? I think the ability to choose an array of indexes is a nice option to have instead of just choosing one.

from trash-cli.

Archie-2021 avatar Archie-2021 commented on July 21, 2024

@Archie-2021

Is there a update on this? I think the ability to choose an array of indexes is a nice option to have instead of just choosing one.

This is already implemented:

Restore multiple trashed files separated by ',', also support range::

$ trash-restore
0 2007-08-30 12:36:00 /home/andrea/foo
1 2007-08-30 12:39:41 /home/andrea/bar
2 2007-08-30 12:39:41 /home/andrea/bar2
3 2007-08-30 12:39:41 /home/andrea/foo2
What file to restore [0..3]: 0-2, 3
$ ls foo bar bar2 foo2
foo bar bar2 foo2

Weird, I am kinda sure was trying something like that to send it an input as an arrays and it didn't work, but now that I am trying again it is working fine.

Thanks

from trash-cli.

ease-zh avatar ease-zh commented on July 21, 2024

image
Never succeeded in restoring multiple files, always raise Invalid entry, anyone know why?

from trash-cli.

andreafrancia avatar andreafrancia commented on July 21, 2024

image Never succeeded in restoring multiple files, always raise Invalid entry, anyone know why?

Please use this page to add a new issue and be careful to follow the instructions about updating your version of trash-cli.

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.