luakit
luakit copied to clipboard
:tab command causes a (confusing) error
Current Behavior: Red flashy error with a stacktrace
Desired Behavior: Nice error message
How can we reproduce it (step by step): luakit :tab
Environment:
Linux Distribution & Version:
Debian stable
Output of luakit --version
:
luakit 2.0.0
built with webkit 2.22.6 (installed version: 2.36.4)
Note about webkit issues:
If you're reporting a rendering issue, please test it with the gnome browser ephiphany as well. If the issue occurs there too, we're very likely not able to help. These issues should be reported to webkit: https://bugs.webkit.org
I think this is a pretty reasonable suggestion. The stacktrace which is used to report errors of this sort would be confronting and difficult to parse even if it used sensible colours. The garish white on red is enough to make ones eyes bleed.
However, there are lots of places where user supplied arguments are used without being tested first, and tracking down and nice-ifying all of them would be a largish job. I'd suggest that pull requests would probably be accepted, but it's unlikely to get to the top of anyone's todo list anytime soon.
You can correct this yourself by overriding the default bind:
modes.add_cmds({
{ ":tab", "Execute command and open result in new tab.", {
func = function (w, o) if o.arg then
w:new_tab() w:run_cmd(":" .. o.arg)
else
w:error("No command given")
end end,
format = "{command}",
}},
})
and given that you're still using 2.0.0, a fix in upstream is unlikely to benefit you.
I fixed it in the current luakit. Thanks for reporting it! We're not going to fix it in 2.0.0 (which is 4 years old by now).
Debian stable is bullseye, which includes luakit 2.2.1. https://packages.debian.org/de/bullseye/luakit
Old-stable (buster) also contained 2.2.1. So you're at least two debian releases behind.
Maybe consider to upgrade?