aboutsummaryrefslogtreecommitdiffstats
path: root/browserenv_windows.go
AgeCommit message (Collapse)Author
2020-12-20Add license (MPL 2.0)Teddy Wing
2020-12-20Add function and variable documentationTeddy Wing
2020-12-20Rename `escapeBrowserCommand()` to `shellEscapeCommand()`Teddy Wing
Didn't like `escapeBrowserCommand()` either, since we're escaping the URL not the rest of the command.
2020-12-20Rename `fmtBrowserCommand()` to `escapeBrowserCommand()`Teddy Wing
Formatting the browser command will incorporate more steps, not just this one, so rename it to be more specific about what it's doing. I want to use the other name for a different function.
2020-12-19Add `BROWSER` support to `OpenURL()`Teddy Wing
If the `BROWSER` environment variable is set, open the given URL using the command specified in the variable. Run the command in a shell process, either from the `SHELL` environment variable or `/bin/sh` on Unix OSes. Run it through `cmd` on Windows. Essentially repurposes my code from https://github.com/pkg/browser/pull/14.