add 'waitmsg' option to configure the message after shell-wait commands (#604)
This commit is contained in:
1 parent
229b7b1ade
commit
0cfd34f30d
7 files changed
+24
-1
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user