ms-jpq / chadtree

File manager for Neovim. Better than NERDTree.
1.64k stars 61 forks source link

trash-cli error when sending file to trash #341

Open cristianUrbina opened 1 year ago

cristianUrbina commented 1 year ago

Hello I don't know if this is caused by misconfiguration but I just installed the plugging using vim-plug the way it says in the readme. I also installed trash-cli by pip3 install trash-cli. The problem is every time a use the keybinding "t" for sending a file to trash I get the following error message (eventhough the file is acctually trashed): Command '(PurePosixPath('/home/cristian/.local/bin/trash'), '--', '/home/cristian/.config/nvim/test.est')' returned non-zero exit status

  1. trash: cannot trash non existent '--' b''

Checking trash-cli man page I see the flag -- is used for deleting files with a name starting with -. It is annoying seeing the error message each time I trash a file. Am I doing something wrong? I got the message to disappear by modifying the following line in file chadtree/chadtree/transitions/delete.py inside _sys_trash function

before await call(arg0, "--", *map(str, paths), cwd=cwd)

after await call(arg0, *map(str, paths), cwd=cwd)