mirror of https://github.com/Hilbis/Hilbish
feat: add back cancel input on ctrl c
parent
86dbb97cae
commit
be5ebd6ada
3
main.go
3
main.go
|
@ -218,8 +218,7 @@ func HandleSignals() {
|
||||||
|
|
||||||
for range c {
|
for range c {
|
||||||
if !running {
|
if !running {
|
||||||
//readline.ReplaceLine("", 0)
|
lr.ClearInput()
|
||||||
//readline.RefreshLine()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5
rl.go
5
rl.go
|
@ -34,3 +34,8 @@ func (lr *LineReader) AddHistory(cmd string) {
|
||||||
readline.SaveHistory(homedir + "/.hilbish-history")
|
readline.SaveHistory(homedir + "/.hilbish-history")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (lr *LineReader) ClearInput() {
|
||||||
|
readline.ReplaceLine("", 0)
|
||||||
|
readline.RefreshLine()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,3 +32,7 @@ func (lr *LineReader) AddHistory(cmd string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (lr *LineReader) ClearInput() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue