Open alecthegeek opened 1 month ago
The handler must return a table containing elements for both action 1 and action 2.
However each time any existing entries are replaced. This is a problem, for example when two plugins both want to add palette commands.
I propose to make this a documentation fix, and create a new enhancement request to allow new entries to be added to the command palette.
An example:
wezterm.on('augment-command-palette', function(window, pane)
return {
{
brief = 'Action 1',
icon = 'fa_plug',
action = wezterm.action.PromptInputLine {
description = "This is action 1",
action = wezterm.action_callback(function(window, pane, line) -- do nothing but wait for keypress
end),
},
},
{
brief = 'Action 2
icon = 'fa_plug',
action = wezterm.action.PromptInputLine {
description = "This is action 2",
action = wezterm.action_callback(function(window, pane, line) -- do nothing but wait for keypress
end),
},
},
}
end)
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
I am not using nightly builds because I want to document mainstream behaviour.
When using the
augment-command-palette
event only the 1st command is registered.To Reproduce
For example
Only the 1st action is show in the command palette.
Configuration
See above
Expected Behavior
I expect action 1 and action 2 to appear in the command palette
Logs
No response
Anything else?
No response