feat: add hilbish.init hook (closes #186)

lua-history
TorchedSammy 2022-07-09 17:04:50 -04:00
parent e0694c8862
commit 90ed12d551
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 2 additions and 0 deletions

View File

@ -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.

View File

@ -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))