Fixes issues with switching to snacks explorer
This commit is contained in:
parent
1699bd2574
commit
8892845c03
6 changed files with 12 additions and 17 deletions
|
|
@ -18,7 +18,8 @@ vim.api.nvim_create_user_command("CopyToPlayers", function()
|
|||
|
||||
os.execute(string.format("mkdir -p '%s'", targetPath))
|
||||
|
||||
local localPath = fs.getCurrentPath()
|
||||
local picker = Snacks.picker.get({ source = "explorer" })
|
||||
local localPath = picker[1]:current().file
|
||||
local targetFilePath = vim.fs.joinpath(targetPath, vim.fn.fnamemodify(localPath, ":t"))
|
||||
os.execute(string.format("ln -s '%s' '%s'", localPath, targetFilePath))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue