mirror of https://github.com/Hilbis/Hilbish
fix: print newline on ctrlc
parent
2089d71ed2
commit
e2c775a89d
4
main.go
4
main.go
|
@ -98,8 +98,10 @@ func main() {
|
|||
|
||||
for {
|
||||
running = false
|
||||
|
||||
hl.SetPrompt(fmtPrompt())
|
||||
input, err := hl.Read()
|
||||
|
||||
if err == io.EOF {
|
||||
// Exit if user presses ^D (ctrl + d)
|
||||
fmt.Println("")
|
||||
|
@ -111,7 +113,7 @@ func main() {
|
|||
}
|
||||
|
||||
input = strings.TrimSpace(input)
|
||||
if len(input) == 0 { continue }
|
||||
if len(input) == 0 { fmt.Print("\n"); continue }
|
||||
|
||||
if strings.HasSuffix(input, "\\") {
|
||||
for {
|
||||
|
|
Loading…
Reference in New Issue