8func openBrowser(url string) error {
9 providers := []string{"xdg-open", "x-www-browser", "www-browser"}
11 // There are multiple possible providers to open a browser on linux
12 // One of them is xdg-open, another is x-www-browser, then there's www-browser, etc.
13 // Look for one that exists and run it
14 for _, provider := range providers {
15 if _, err := exec.LookPath(provider); err == nil {
16 return runCmd(provider, url)
20 return &exec.Error{Name: strings.Join(providers, ","), Err: exec.ErrNotFound}
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list