#117·termshark

Feature creep request: Lua scripting

Author: deliciouslytypedCreated Apr 11, 2021Updated Jan 15, 2024
Labelsfeature request

I don't have anything concrete in mind but tshark supports lua scripting, and it could be neat if termshark had it (if it exposed enough functionality to be useful). I don't know if wireshark supports lua for any frontend stuff.

As some precedent, the micro text editor is also written in Go, and has a (somewhat limited) integrated Lua interpreter that can be used as an example. I've done a little scripting with the micro editor: https://github.com/deliciouslytyped/micro-selfexec .

The thing is, the last time I looked I couldn't find an actively maintained Lua Go implementation. The one micro uses is https://github.com/yuin/gopher-lua/ .

See https://github.com/zyedidia/micro/search?q=commenter%3Adeliciouslytyped&type=issues for several issues I had with scripting micro. Namely, relatively low exposure of internal methods, and inability to load external shared objects (the latter being a gopher-lua limitation).

From a small bit of searching:

What to choose is entirely non-obvious to me, and I find none of the existing repos particularly motivating. Thus my gut feeling is "don't do this". :P At least not like this.