Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhuster committed Nov 26, 2024
1 parent 4712ec9 commit 9e5eb69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

- Nvim 0.8 or later
- [dirvish.vim](https://github.com/justinmk/vim-dirvish)
- Optional : if you use move-to-trash feature
- You need to install Python3 provider for Neovim. You can check if `:echo has('python3')` returns 1 to knwo whether Python3 provider is installed. See `:h provider-python` for more information
- You also need to install Python library [send2trash](https://pypi.org/project/Send2Trash/)
- Optional : In case you want to move files to trash instead of deleting permanently (opts.operations.remove = "trash"):
- Python3 provider for Neovim. `:echo has('python3')` should return 1. See `:h provider-python` for more information on how to set it up.
- [send2trash](https://pypi.org/project/Send2Trash/)

# Installation

Expand Down
3 changes: 2 additions & 1 deletion lua/dirvish-do/operations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ function M.mv(oldPath, newPath)
end

function M.trash(path)
vim.cmd.python3('from send2trash import send2trash; send2trash("' .. path .. '")')
local py3cmd = string.format('from send2trash import send2trash; send2trash("%s")', path)
vim.cmd.python3(py3cmd)
end

return M

0 comments on commit 9e5eb69

Please sign in to comment.