aboutsummaryrefslogtreecommitdiffstats
path: root/browser_unix.go
AgeCommit message (Collapse)Author
2019-06-23Add support for the BROWSER environment variablesupport-for-BROWSER-environment-variableTeddy Wing
Allow user-defined URL-opening commands via the BROWSER environment variable. This enables using a non-default browser, or changing the browser for a single command. For example, on Mac: $ export BROWSER='open -a Firefox' Windows: > setx BROWSER "start iexplore" In UNIX environments, the command is run through `$SHELL -c`, or `/bin/sh` if `$SHELL` is not set. On Windows, it uses `cmd /c`. Ensure that URLs are properly quoted between UNIX and Windows environments in `fmtBrowserCmd()`.