Problem Description
Pdoc uses a hardcoded priority list for which browser to launch, ignoring the user's preference if set in the BROWSER environment variable or similar.
Proposal
Pdoc should launch the browser specified by $BROWSER, if set, or use something like xdg-open (which will take $BROWSER into account).
Alternatives
Place Firefox higher up in the priority, users with Firefox installed are more likely to actively prefer it over other browsers. Users preferring Chrom(e|ium) are less likely to have Firefox installed (probably).
Additional context
Hardcoded list here: https://github.com/mitmproxy/pdoc/blob/main/pdoc/web.py#L173-L186
Reproduction steps
export BROWSER=firefox
pdoc <module>
# Expect docs to open in already running firefox, pdoc instead spawns a chromium process if it is installed
Problem Description
Pdoc uses a hardcoded priority list for which browser to launch, ignoring the user's preference if set in the
BROWSERenvironment variable or similar.Proposal
Pdoc should launch the browser specified by
$BROWSER, if set, or use something likexdg-open(which will take$BROWSERinto account).Alternatives
Place Firefox higher up in the priority, users with Firefox installed are more likely to actively prefer it over other browsers. Users preferring Chrom(e|ium) are less likely to have Firefox installed (probably).
Additional context
Hardcoded list here: https://github.com/mitmproxy/pdoc/blob/main/pdoc/web.py#L173-L186
Reproduction steps