mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-02 03:33:22 +00:00
feat: throw hilbish.exit hook (closes #99)
This commit is contained in:
parent
0b1b5bff2d
commit
3805f13369
1
main.go
1
main.go
@ -172,6 +172,7 @@ input:
|
||||
|
||||
if err == io.EOF {
|
||||
// Exit if user presses ^D (ctrl + d)
|
||||
hooks.Em.Emit("hilbish.exit")
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
|
@ -45,6 +45,7 @@ commander.register('cd', function (args)
|
||||
end)
|
||||
|
||||
commander.register('exit', function()
|
||||
bait.throw('hilbish.exit')
|
||||
os.exit(0)
|
||||
end)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user