Open snowman opened 4 years ago
It'd also be nice if trash-restore
could accept lines from trash-ls
. That would allow doing a simple pipe such as: trash-ls | fzf | trash-restore
, which would be a very nice interface to use.
If someone is here from a google search on using trash-restore
with fzf
, I came up with a (hacky) solution:
alias trash-restore='echo 0 | trash-restore $(trash-list | grep $(pwd) --color=never | sed "s/^[^/]*//" | fzf) > /dev/null'
(Note: this will only list files in the current directory, if you want to list files everywhere remove the grep
part)
The number may change between different invocations. I think trash-restore should accept a path argument instead of a number.
I agree.
When running
trash-restore
without argument, which by default show restorable files in list, and prompt user to select one to restoreI want to run without interaction, like when run
trash-restore 0
, it should output something like:ignore me