aboutsummaryrefslogtreecommitdiffstats
path: root/browserenv.go
AgeCommit message (Collapse)Author
2020-12-19Add `BROWSER` support to `OpenReader()`Teddy Wing
If the `BROWSER` environment variable is set, open the reader in the given browser. Works by copying the `Reader`'s contents to a temporary file and opening that with `OpenFile()`.
2020-12-19Add `BROWSER` support to `OpenFile()`Teddy Wing
If the `BROWSER` environment variable is set, open the given file path in the given browser.
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.
2020-12-14Wrap `github.com/pkg/browser` in a new `browserenv` packageTeddy Wing
This will be used to extend `browser`'s functionality.