-
I’m trying to define a keybinding in Zellij to open a new tab and run lazygit in it. I’ve created a specific layout for lazygit, and I’m using the run command to achieve this. The setup works but with an unexpected issue: it creates a new tab with lazygit, but it also opens a new pane in the main tab.
Here’s a video illustrating the issue. Why is it creating a new pane in the main tab, and how can I prevent this behavior? Any pointers would be appreciated! screenrecord.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'd recommend using the When you invoke it from the CLI, you're essentially starting a new pane with the output of the above command |
Beta Was this translation helpful? Give feedback.
I'd recommend using the
NewTab
keybind-action directly rather than invoking it from the CLI: https://zellij.dev/documentation/keybindings-possible-actions#newtabWhen you invoke it from the CLI, you're essentially starting a new pane with the output of the above command
zellij action new-tab
whose sole purpose is to open a new tab. There are ways of getting this pane to close on exit, but I think if you use the above keybindable-action, this problem goes away.