From 90ed12d55132586ea83d4683459053606d116597 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Sat, 9 Jul 2022 17:04:50 -0400 Subject: [PATCH] feat: add hilbish.init hook (closes #186) --- CHANGELOG.md | 1 + main.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a2a091..5e056df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ having and using multiple runners. - `fs.pathListSep` is the separator for $PATH env entries - Lua modules located in `hilbish.userDir.data .. '/hilbish/start'` (like `~/.local/share/hilbish/start/foo/init.lua`) will be ran on startup +- `hilbish.init` hook, thrown after Hilbish has initialized Lua side ### Changed - **Breaking Change:** Upgraded to Lua 5.4. diff --git a/main.go b/main.go index 9421bfc..ce1a7f3 100644 --- a/main.go +++ b/main.go @@ -138,6 +138,7 @@ func main() { } else { runConfig(*configflag) } + hooks.Em.Emit("hilbish.init") if fileInfo, _ := os.Stdin.Stat(); (fileInfo.Mode() & os.ModeCharDevice) == 0 { scanner := bufio.NewScanner(bufio.NewReader(os.Stdin))