mirror of https://github.com/Hilbis/Hilbish
feat: add hilbish.init hook (closes #186)
parent
e0694c8862
commit
90ed12d551
|
@ -61,6 +61,7 @@ having and using multiple runners.
|
||||||
- `fs.pathListSep` is the separator for $PATH env entries
|
- `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`)
|
- Lua modules located in `hilbish.userDir.data .. '/hilbish/start'` (like `~/.local/share/hilbish/start/foo/init.lua`)
|
||||||
will be ran on startup
|
will be ran on startup
|
||||||
|
- `hilbish.init` hook, thrown after Hilbish has initialized Lua side
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- **Breaking Change:** Upgraded to Lua 5.4.
|
- **Breaking Change:** Upgraded to Lua 5.4.
|
||||||
|
|
1
main.go
1
main.go
|
@ -138,6 +138,7 @@ func main() {
|
||||||
} else {
|
} else {
|
||||||
runConfig(*configflag)
|
runConfig(*configflag)
|
||||||
}
|
}
|
||||||
|
hooks.Em.Emit("hilbish.init")
|
||||||
|
|
||||||
if fileInfo, _ := os.Stdin.Stat(); (fileInfo.Mode() & os.ModeCharDevice) == 0 {
|
if fileInfo, _ := os.Stdin.Stat(); (fileInfo.Mode() & os.ModeCharDevice) == 0 {
|
||||||
scanner := bufio.NewScanner(bufio.NewReader(os.Stdin))
|
scanner := bufio.NewScanner(bufio.NewReader(os.Stdin))
|
||||||
|
|
Loading…
Reference in New Issue