mirror of https://gitee.com/namelin2022/ollama
committed by
GitHub
3 changed files with 25 additions and 8 deletions
@ -0,0 +1,18 @@ |
|||
//go:build !windows
|
|||
|
|||
package readline |
|||
|
|||
import ( |
|||
"syscall" |
|||
) |
|||
|
|||
func handleCharCtrlZ(fd int, termios *Termios) (string, error) { |
|||
if err := UnsetRawMode(fd, termios); err != nil { |
|||
return "", err |
|||
} |
|||
|
|||
syscall.Kill(0, syscall.SIGSTOP) |
|||
|
|||
// on resume...
|
|||
return "", nil |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
package readline |
|||
|
|||
func handleCharCtrlZ(fd int, state *State) (string, error) { |
|||
// not supported
|
|||
return "", nil |
|||
} |
|||
Loading…
Reference in new issue