add 'waitmsg' option to configure the message after shell-wait commands (#604)

This commit is contained in:
gotroyb127 authored and GitHub committed 2021-04-06 18:57:23 +03:00
1 parent 229b7b1ade
commit 0cfd34f30d
7 files changed
+24 -1

No files matched your search

+2 -1
View File
@@ -1153,13 +1153,14 @@ func (ui *ui) resume() error {
}
func anyKey() {
fmt.Print(gOpts.waitmsg)
defer fmt.Print("\n")
oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
if err != nil {
panic(err)
}
defer term.Restore(int(os.Stdin.Fd()), oldState)
fmt.Print("Press any key to continue")
b := make([]byte, 1)
os.Stdin.Read(b)
}