Skip to content

Commit

Permalink
Run the user's shell
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Mar 4, 2020
1 parent 3f85c48 commit dbad581
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions term.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ func (t *Terminal) onConfigure() {
}

func (t *Terminal) open() error {
// Create shell command.
c := exec.Command("bash")
shell := os.Getenv("SHELL")
if shell == "" {
shell = "bash"
}
c := exec.Command(shell)

// Start the command with a pty.
handle, err := pty.Start(c)
Expand Down

0 comments on commit dbad581

Please sign in to comment.