From 7d4e897a7b414c1569ae14d5b426f2e95165f0af Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 20 Dec 2020 18:55:41 +0100 Subject: Add function and variable documentation --- browserenv_unix.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'browserenv_unix.go') 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) } -- cgit v1.2.3