More work on shell

This commit is contained in:
Kovid Goyal
2022-10-07 10:42:26 +05:30
parent fd36435262
commit 9f2b2eac85
5 changed files with 134 additions and 29 deletions

View File

@@ -53,6 +53,10 @@ type Loop struct {
// the terminal on shutdown
OnInitialize func() (string, error)
// Called just before the loop shuts down. Any returned string is written to the terminal before
// shutdown
OnFinalize func() string
// Called when a key event happens
OnKeyEvent func(event *KeyEvent) error