2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-01 19:23:24 +00:00

fix: set prompt in hilbish.read

This commit is contained in:
TorchedSammy 2022-03-06 14:23:41 -04:00
parent ef6bf24cda
commit fb3cedb161
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD

3
api.go
View File

@ -206,7 +206,8 @@ func getenv(key, fallback string) string {
// --- @param prompt string // --- @param prompt string
func hlread(L *lua.LState) int { func hlread(L *lua.LState) int {
luaprompt := L.CheckString(1) luaprompt := L.CheckString(1)
lualr := newLineReader(luaprompt) lualr := newLineReader("")
lualr.SetPrompt(luaprompt)
input, err := lualr.Read() input, err := lualr.Read()
if err != nil { if err != nil {