feat: add command.precmd hook

pull/78/head
sammyette 2021-10-13 22:53:09 -04:00
parent 9eabe5323d
commit 4596159b8f
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 1 additions and 0 deletions

1
rl.go
View File

@ -22,6 +22,7 @@ func NewLineReader(prompt string) *LineReader {
} }
func (lr *LineReader) Read() (string, error) { func (lr *LineReader) Read() (string, error) {
hooks.Em.Emit("command.precmd", nil)
return readline.String(lr.Prompt) return readline.String(lr.Prompt)
} }