add an option to configure shell used by commands

This commit is contained in:
Gokcehan committed 2016-08-27 14:12:03 +03:00
1 parent 4dc8eccf9e
commit ce25fc55ca
6 files changed
+25 -10

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ type App struct {
func waitKey() error {
// TODO: this should be done with termbox somehow
cmd := exec.Command(envShell, "-c", "echo; echo -n 'Press any key to continue'; stty -echo; read -n 1; stty echo; echo")
cmd := exec.Command(gOpts.shell, "-c", "echo; echo -n 'Press any key to continue'; stty -echo; read -n 1; stty echo; echo")
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
@@ -98,7 +98,7 @@ func (app *App) runShell(s string, args []string, wait bool, async bool) {
}
args = append([]string{"-c", s, "--"}, args...)
cmd := exec.Command(envShell, args...)
cmd := exec.Command(gOpts.shell, args...)
if !async {
cmd.Stdin = os.Stdin