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

trash-rm doesn't recognize strings containing square brackets "[]".

Open derrend opened this issue 5 years ago • 1 comments

I'm trying to delete torrents automatically but trash-rm doesn't recognize strings with square brackets in them, eg "[720p]". Is there a known way to overcome this issue?

derrend avatar Mar 28 '20 09:03 derrend

You need to escape the square brackets enclosing them in square bracket:

$ touch '[720p]'
$ trash-put '[720p]'
$ trash-list
2021-05-20 22:43:44 /Users/andrea/trash-cli/[720p]
$ trash-rm '[[]720p[]]'
$ trash-list

andreafrancia avatar May 20 '21 20:05 andreafrancia