trash-cli icon indicating copy to clipboard operation
trash-cli copied to clipboard

restore files with their original location

Open nesro opened this issue 8 years ago • 1 comments
trafficstars

I'm writing a wrapper over trash-cli and I want to restore file with their original location. I tried to make a workaround using your implementation but it is was not nice. I'm proposing a new, simple, way how to do that.

nesro avatar Feb 14 '17 14:02 nesro

Hey there, I am also very interested in this PR. This would allow us to e.g. restore the last trashed path using a command such as trash-restore $(trash-list | sort -k 1 | tail -n1 | awk '{print($3)}') and call it from ranger or similar tools. Currently trash-restore still asks for an index interactively, even if there is only a single entry:

~ trash-restore $(trash-list | sort -k 1 | tail -n1 | awk '{print($3)}')
  0 2022-01-17 22:57:52 /home/remolueoend/trash-test
  What file to restore [0..0]:

If there is any interest, I'd like to bring this PR up to date.

remolueoend avatar Jan 17 '22 22:01 remolueoend

Unfortunately there are some conflicts.

andreafrancia avatar Mar 28 '24 11:03 andreafrancia