Closed petrocino closed 10 months ago
https://github.com/andreafrancia/trash-cli/issues/284
trash-cli is designed for Linux, on macOS I suggest to use the trash command by Ali Rantakari. It is available at https://hasseg.org/trash/ This program work well with the Bin of macOS.
You can install it with:
$ brew install trash
The trash API in macOS is broken and does not track the original path. This trash command can work around this problem with the -F option that make it to uses the Finder application as backend.
I've put this alias in my .zshrc:
alias trash='/opt/homebrew/Cellar/trash/0.9.2/bin/trash -F'
At the present trash-cli does not support a config file. The workaround is using aliases in your .zshrc file.
Example:
alias trash-put='trash-put --trash-dir ~/garbage'
It's a weird behavior of it. It sends to a local hidden dir on home:
trash-cli version 0.22.10.20
Are you using the latest version of trash-cli? Yes
Have you tried if the bug is present in the latest version of trash-cli? Yes
Operating system:
To Reproduce Copy and paste the commands (and their output) to execute in order to reproduce the behavior:
Expected behavior I would like to define where my trash will be located (eg. $HOME/garbage), or send it to macOS recycle bin, which is more reasonable to me.
I know that I can use the
--trash-dir TRASHDIR
option, but would be much better to have a.trash-config file
, or somehow a way to define it on.zshrc
file