mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-02 19:53:23 +00:00
feat: add command.preexec hook
it provides 2 arguments: what the user typed, and the command hilbish will execute.
This commit is contained in:
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…
x
Reference in New Issue
Block a user