-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next Tab macros? #1318
Comments
In the current tab, Yazi has a set of equivalents like As for referencing paths across tabs, it’s not directly supported right now, but you can achieve it through the plugin system. In your plugin, you can access file data from all tabs via -- ~/.config/yazi/plugins/my-shell.yazi/init.lua
local function quote(tab)
return tab and ya.quote(tostring(tab.current.hovered.url)) or ""
end
return {
entry = function(_, args)
ya.manager_emit("shell", {
block = true,
confirm = true,
args[1] .. " " .. quote(cx.tabs[1]) .. " " .. quote(cx.tabs[2]),
})
end,
} And the keybindings: { on = "D", run = 'plugin my-shell --sync --args=diff', desc = "Diff tab1 and tab2" },
{ on = "E", run = 'plugin my-shell --sync --args=echo', desc = "Echo tab1 and tab2" }, Yazi now uses the native If we were to support it directly, we'd need to figure out a way to make both compatible. |
Thanks for the reply, hopefully there is a better solution in the future. |
Tracked by #51 |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
Please describe the problem you're trying to solve
is there a way to execute a command and get the next tab path using a variable?
this is possible in ranger, theres a thing called macros so im not sure if it exist on yazi yet
This was some of the ranger commands/binding i was using for example
Would you be willing to contribute this feature?
Describe the solution you'd like
add some of those ranger macros ideas so we all can use it in our custom shell commands keybindings.
e.g i want to extract a zip file (current tab) into the next tab using just a keybinding.
or any other commands really like rsync, cp, mv ...etc
Additional context
No response
The text was updated successfully, but these errors were encountered: