diff options
Diffstat (limited to 'browser_unix.go')
| -rw-r--r-- | browser_unix.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/browser_unix.go b/browser_unix.go new file mode 100644 index 0000000..30d57db --- /dev/null +++ b/browser_unix.go @@ -0,0 +1,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) +} |
