diff --git a/golibs/bait/bait.go b/golibs/bait/bait.go index 92c2df1..929a26d 100644 --- a/golibs/bait/bait.go +++ b/golibs/bait/bait.go @@ -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