Follow a symlink #1493
Follow a symlink
#1493
-
I would like to have a keybinding to follow a symlink on a hovered file/directory. I have already tried: { on = [ "g", "l" ], run = '''shell "cd $(readlink '@0')" --confirm''', desc = "Go to the symlink original directory" }, and { on = [ "g", "l" ], run = "cd $(readlink '@0')", desc = "Go to the symlink original directory" }, But nothing works. Am I doing something wrong? Thanks! UPDATE: return {
entry = function()
local h = cx.active.current.hovered
local original_url = h.link_to
if h and original_url then
ya.manager_emit("reveal", { path = original_url })
end
end,
} This cds into the symlink's parent directory, not the original path. Why is the original path not being passed into the |
Beta Was this translation helpful? Give feedback.
Answered by
lkschu
Oct 18, 2024
Replies: 1 comment
-
Change the plugin to this, then it works: return {
entry = function()
local h = cx.active.current.hovered
local original_url = h.link_to
if h and original_url then
ya.manager_emit("cd", { original_url })
end
end,
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
PedroDSFerreira
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change the plugin to this, then it works: