docs: split out the KeyAssignment enum variants

This makes the individual functions a bit easier to discover,
and a lot easier to link to.
This commit is contained in:
Wez Furlong committed 2020-10-10 08:45:13 -07:00
1 parent 7af4152275
commit 809bb53387
39 files changed
+623 -526

No files matched your search

@@ -0,0 +1,28 @@
# SpawnCommandInNewWindow
Spawn a new tab into a brand new window.
The argument controls which command is run in the tab; it is a lua table
with the following fields:
* `args` - the argument array specifying the command and its arguments.
If omitted, the default program will be run.
* `cwd` - the current working directory to set for the command.
* `set_environment_variables` - a table specifying key/value pairs to
set in the environment
* `domain` - specifies the domain into which the tab will be spawned.
See `SpawnTab` for examples.
```lua
local wezterm = require 'wezterm';
return {
keys = {
-- CMD-y starts `top` in a new window
{key="y", mods="CMD", action=wezterm.action{SpawnCommandInNewWindow={
args={"top"}
}}},
}
}
```