mirror of https://github.com/Hilbis/Hilbish
feat: throw hilbish.exit hook (closes #99)
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…
Reference in New Issue