2
2
鏡像自 https://github.com/Hilbis/Hilbish synced 2025-07-15 15:22:03 +00:00

chore: reorder code

This commit is contained in:
TorchedSammy 2021-11-22 18:58:30 -05:00
父節點 e67c549714
當前提交 538ba3547f
簽署人: sammyette
GPG 金鑰 ID: 904FC49417B44DCD

查看文件

@ -20,15 +20,19 @@ func New() Bait {
func (b *Bait) Loader(L *lua.LState) int {
mod := L.SetFuncs(L.NewTable(), map[string]lua.LGFunction{})
util.Document(L, mod,
`Bait is the event emitter for Hilbish. Why name it bait?
Because it throws hooks that you can catch (emits events
that you can listen to) and because why not, fun naming
is fun. This is what you will use if you want to listen
in on hooks to know when certain things have happened,
like when you've changed directory, a command has
failed, etc. To find all available hooks, see doc hooks.`)
L.SetField(mod, "throw", luar.New(L, b.bthrow))
L.SetField(mod, "catch", luar.New(L, b.bcatch))
util.Document(L, mod, `Bait is the event emitter for Hilbish. Why name it bait?
Because it throws hooks that you can catch
(emits events that you can listen to) and because why not,
fun naming is fun. This is what you will use if you want to
listen in on hooks to know when certain things have happened,
like when you've changed directory, a command has failed, etc.`)
L.Push(mod)
return 1