2
2
kopia lustrzana https://github.com/Hilbis/Hilbish synced 2025-07-18 16:52:02 +00:00

Porównaj commity

..

2 Commity

Autor SHA1 Wiadomość Data
sammyette
4596159b8f
feat: add command.precmd hook 2021-10-13 22:53:09 -04:00
sammyette
9eabe5323d
fix: throw command.exit with 0 code if input is nothing 2021-10-13 22:51:38 -04:00
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -184,7 +184,10 @@ input:
}
input = strings.TrimSpace(input)
if len(input) == 0 { continue }
if len(input) == 0 {
hooks.Em.Emit("command.exit", 0)
continue
}
if strings.HasSuffix(input, "\\") {
for {

1
rl.go
Wyświetl plik

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