aboutsummaryrefslogtreecommitdiffstats
path: root/browser_unix.go
blob: 30d57db3f4dc7eb05ab31d7d9118e3bb11ebe870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// +build !windows

package browser

import (
	"fmt"
	"os"
)

func shell() (shell, flag string) {
	shell = os.Getenv("SHELL")

	if shell == "" {
		shell = "/bin/sh"
	}

	return shell, "-c"
}

func fmtBrowserCmd(browser, url string) string {
	return fmt.Sprintf("%s '%s'", browser, url)
}