Description of the problem or steps to reproduce
- Make a plugin that uses
shell.RunInteractiveShell() in ~/.config/micro/plug/exectest/exectest.lua:
local micro = import("micro")
local config = import("micro/config")
local shell = import("micro/shell")
function init()
config.MakeCommand("exec", exec, config.NoComplete)
end
function exec()
shell.RunInteractiveShell("sh -c 'echo press ctrl+c && sleep 10'", true, false)
end
- Run the plugin (ctrl+e and type
exec)
- Press ctrl+c during execution
I would expect this to stop the interactive shell and return to the file I was editing. What happens instead is it kills the entire micro-editor process. It looks like this is also not what the code for shell.RunInteractiveShell was intended to do:
https://github.com/zyedidia/micro/blob/c8c7ad57bde1188364c5ad187de508646b01a52e/internal/shell/shell.go#L103-L111
Version information
OS: Linux (OpenSUSE Tumbleweed)
Version: 0.0.0-unknown
Commit hash: c8c7ad5
Compiled on October 31, 2022