trash-cli
trash-cli copied to clipboard
restore files with their original location
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.
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.
Unfortunately there are some conflicts.