-
Notifications
You must be signed in to change notification settings - Fork 471
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
Alias shell support #1206
Comments
Yazi uses For Another solution is to define those aliases in Yazi, like: { on = [ ":", "l", "g" ], run = "shell lazygit --block --confirm" } Or, if you just want to use return {
entry = function()
local value, event = ya.input {
title = "Zsh shell:",
position = { "top-center", y = 3, w = 40 },
}
if event == 1 then
ya.manager_emit("shell", {
"zsh -ic " .. ya.quote(value .. "; exit", true),
block = true,
confirm = true,
})
end
end,
} Then bind it in your { on = [ ":" ], run = "plugin zsh" } |
This is how it looks like. I tried changing the keymap directly where it originally as well as adding separately like-
Although if I do |
I've updated the code, try it again. This is how it works on my side: screenshot-000830.mp4 |
I donno why it is not working for me :( . Is their any thing I can send details on so that it can be debugged? It looks ideal at your end. |
This plugin essentially does: sh -c 'zsh -ic "your-alias-here; exit"' so you can run it directly in your shell and see what happens. |
That worked perfectly. it opened lazygit nicely. oh wait. I see what might be the problem. I have setup few commands to run when my zsh opens like taskwarrior. Thats why it didnt open directly. Although lazygit takes over the whole screen so it should technically work in yazi as well. What do you think? ( This is a bit personal customisation going on here) Ill report back to you the results after I remove them. |
It works fine even with and without having the extra text and commands. |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
Please describe the problem you're trying to solve
I have a ton of aliases, like for example instead of lazygit, I am used to typing
lg
. So when I press:
for shell, and type lazygit, it works fine but not withlg
.Similarly for other aliases too.
Would you be willing to contribute this feature?
Describe the solution you'd like
If from my ~/.zshrc (or bashrc, etc.) aliases can be ran through a flag
--alias
then it would be great. This would add on the functionalities.Additional context
Also I don't know how to write lua/rust but if someone can help me with how to do it. I am willing to work on this.
The text was updated successfully, but these errors were encountered: