2
2
espelhamento de https://github.com/Hilbis/Hilbish sincronizado 2025-07-11 05:22:02 +00:00

fix: add back prompt global var

fixes an issue with multiline prompt overriding user's prompt
permanently
Esse commit está contido em:
TorchedSammy 2022-03-05 15:46:38 -04:00
commit f1dfd59c4c
Assinado por: sammyette
ID da chave GPG: 904FC49417B44DCD
4 arquivos alterados com 6 adições e 4 exclusões

2
api.go
Ver arquivo

@ -175,7 +175,7 @@ These will be formatted and replaced with the appropriate values.
--- @param str string
*/
func hlprompt(L *lua.LState) int {
prompt := L.CheckString(1)
prompt = L.CheckString(1)
lr.SetPrompt(fmtPrompt(prompt))
return 0

Ver arquivo

@ -71,5 +71,5 @@ func (h *fileHistory) Len() int {
}
func (h *fileHistory) Dump() interface{} {
return nil
return h.items
}

Ver arquivo

@ -165,6 +165,7 @@ func main() {
input:
for interactive {
lr.SetPrompt(fmtPrompt(prompt))
running = false
input, err := lr.Read()

Ver arquivo

@ -7,6 +7,7 @@ var (
defaultHistDir = ""
commonRequirePaths = "';./libs/?/init.lua;./?/init.lua;./?/?.lua'"
prompt string
multilinePrompt = "> "
)