Q (plugin development): ya.manager_emit
doesn't seem to do anything
#1230
-
I'm trying to make a plugin, but for some reason Here's the source code of the plugin: An example is using the command to open the editor, the line https://github.com/hankertrix/augment-command.yazi/blob/main/init.lua#L341 is reached and the line is added to the log file, but the editor doesn't open. Running the plugin with It probably has something to do with the async system, but I'm unsure where I'm going wrong. Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The first argument of - ya.manager_emit('shell "' .. command .. ' $0"', args)
+ ya.manager_emit('shell', { command .. ' "$0"', block = true, confirm = true }) |
Beta Was this translation helpful? Give feedback.
The first argument of
ya.manager_emit()
is the command name without any parameters, while the parameters are in its second table. So you need: