use x/term instead of stty/pause to prompt any key

cc #480
This commit is contained in:
Gokcehan committed 2021-02-21 18:01:20 +03:00
1 parent c071e37316
commit 2c3cd35a5d
6 files changed
+17 -33

No files matched your search

-12
View File
@@ -94,18 +94,6 @@ func detachedCommand(name string, arg ...string) *exec.Cmd {
return cmd
}
func pauseCommand() *exec.Cmd {
cmd := `echo
echo -n 'Press any key to continue'
old=$(stty -g)
stty raw -echo
eval "ignore=\$(dd bs=1 count=1 2> /dev/null)"
stty $old
echo`
return exec.Command(gOpts.shell, "-c", cmd)
}
func shellCommand(s string, args []string) *exec.Cmd {
if len(gOpts.ifs) != 0 {
s = fmt.Sprintf("IFS='%s'; %s", gOpts.ifs, s)