add wezterm.has_action

refs: https://github.com/wez/wezterm/issues/3454
This commit is contained in:
Wez Furlong committed 2023-04-06 20:46:32 -07:00
1 parent b1c58bad39
commit b45a4d7215
3 files changed
+29

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# wezterm.has_action(NAME)
{{since('nightly')}}
Returns true if the string *NAME* is a valid key assignment action variant
that can be used with [wezterm.action](action.md).
This is useful when you want to use a wezterm configuration across multiple
different versions of wezterm.
```lua
if wezterm.has_action 'PromptInputLine' then
table.insert(config.keys, {
key = 'p',
mods = 'LEADER',
action = wezterm.action.PromptInputLine {
-- other parameters here
},
})
end
```