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

package browserenv

import (
	"fmt"
	"os"
)

// TODO
func shell() (args []string) {
	shell := os.Getenv("SHELL")

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

	return []string{shell, "-c"}
}

// TODO
func escapeBrowserCommand(browser, url string) string {
	// TODO: handle %s in browser command
	return fmt.Sprintf("%s '%s'", browser, url)
}