2020-10-10 18:40:14 +03:00
|
|
|
## SpawnCommandInNewTab
|
|
|
|
|
|
|
|
Spawn a new tab into the current window.
|
2020-10-10 20:49:36 +03:00
|
|
|
The argument is a `SpawnCommand` struct that is discussed in more
|
|
|
|
detail in the [SpawnCommand](../SpawnCommand.md) docs.
|
2020-10-10 18:40:14 +03:00
|
|
|
|
|
|
|
```lua
|
2022-06-25 16:58:10 +03:00
|
|
|
local wezterm = require 'wezterm'
|
2020-10-10 18:40:14 +03:00
|
|
|
|
|
|
|
return {
|
|
|
|
keys = {
|
|
|
|
-- CMD-y starts `top` in a new window
|
2022-06-25 20:59:17 +03:00
|
|
|
{key="y", mods="CMD", action=wezterm.action.SpawnCommandInNewTab{
|
2020-10-10 18:40:14 +03:00
|
|
|
args={"top"}
|
2022-06-25 16:58:10 +03:00
|
|
|
}},
|
2020-10-10 18:40:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
|