diff options
author | Teddy Wing | 2020-12-20 18:55:41 +0100 |
---|---|---|
committer | Teddy Wing | 2020-12-20 18:58:08 +0100 |
commit | 7d4e897a7b414c1569ae14d5b426f2e95165f0af (patch) | |
tree | 6c96a417188bdfb5c8fa9fc0637bc592d131ffce /browserenv_unix.go | |
parent | 19a6561e2a3f21ffb2510d5f2dc9a8cf293dddaf (diff) | |
download | browserenv-7d4e897a7b414c1569ae14d5b426f2e95165f0af.tar.bz2 |
Add function and variable documentation
Diffstat (limited to 'browserenv_unix.go')
-rw-r--r-- | browserenv_unix.go | 6 |
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) } |