ミラー元
https://github.com/sammy-ette/Hilbish
前回の同期 2025-08-10 02:52:03 +00:00
fix: custom handle ctrl c from readline
このコミットが含まれているのは:
コミット
36cd4d4123
9
main.go
9
main.go
@ -14,6 +14,7 @@ import (
|
||||
|
||||
"github.com/pborman/getopt"
|
||||
"github.com/yuin/gopher-lua"
|
||||
"github.com/maxlandon/readline"
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
@ -174,8 +175,12 @@ input:
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
// If we get a completely random error, print
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
if err != readline.CtrlC {
|
||||
// If we get a completely random error, print
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
fmt.Println("^C")
|
||||
continue
|
||||
}
|
||||
oldInput := input
|
||||
|
||||
|
||||
読み込み中…
x
新しいイシューから参照
ユーザーをブロックする