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 {
|
||||
if !running {
|
||||
//readline.ReplaceLine("", 0)
|
||||
//readline.RefreshLine()
|
||||
lr.ClearInput()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
5
rl.go
5
rl.go
|
@ -34,3 +34,8 @@ func (lr *LineReader) AddHistory(cmd string) {
|
|||
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
|
||||
}
|
||||
|
||||
func (lr *LineReader) ClearInput() {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue