aboutsummaryrefslogtreecommitdiffstats
path: root/browserenv_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'browserenv_unix.go')
-rw-r--r--browserenv_unix.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/browserenv_unix.go b/browserenv_unix.go
index 6d569e4..4565d59 100644
--- a/browserenv_unix.go
+++ b/browserenv_unix.go
@@ -7,7 +7,8 @@ import (
"os"
)
-// TODO
+// shell returns the current shell specified by the SHELL environment variable
+// along with a "-c" argument. If SHELL is undefined, `/bin/sh` is used.
func shell() (args []string) {
shell := os.Getenv("SHELL")
@@ -18,7 +19,8 @@ func shell() (args []string) {
return []string{shell, "-c"}
}
-// TODO
+// shellEscapeCommand formats a browser command with url, escaping url by
+// wrapping it in single quotes.
func shellEscapeCommand(browser, url string) string {
return fmt.Sprintf("%s '%s'", browser, url)
}