Skip to content

Handle BROWSER env var for the various forge browse commands #45

@kfdm

Description

@kfdm

Right now it has a few options coded

https://github.com/git-pkgs/forge/blob/v0.3.0/internal/cli/browse.go#L90-L106

Python handles several extra by checking things like TERM, DISPLAY, and BROWSER

https://github.com/python/cpython/blob/3.14/Lib/webbrowser.py#L536-L580

I wonder if at least BROWSER support could be added. A quick scan didn't really show any existing packages that handle BROWSER. There is an internal version used in Go that could possibly be referenced

https://cs.opensource.google/go/go/+/refs/tags/go1.25.6:src/cmd/internal/browser/browser.go

But of course the internal scope means it can't be called from regular go projects.

Any thoughts on a version of this that you would be happy with if I was to attempt at PR ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions