mirror of https://github.com/Hilbis/Hilbish
feat: add command.preexec hook
it provides 2 arguments: what the user typed, and the command hilbish will execute.pull/78/head
parent
63061e3a52
commit
e4833bdba9
1
shell.go
1
shell.go
|
@ -31,6 +31,7 @@ func RunInput(input string) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
hooks.Em.Emit("command.preexec", input, cmdString)
|
||||||
|
|
||||||
// First try to load input, essentially compiling to bytecode
|
// First try to load input, essentially compiling to bytecode
|
||||||
fn, err := l.LoadString(cmdString)
|
fn, err := l.LoadString(cmdString)
|
||||||
|
|
Loading…
Reference in New Issue