1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # browser_select.zprofile: Setup $BROWSER for the "best" available WWW browser
4 # Don't run this plugin on "check-plugins"!
5 [[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 92
8 if [[ -z "$BROWSER" ]]; then
9 if [[ -n "$DISPLAY" ]]; then
10 # X11 available, consider X11-based browsers, too!
11 x11_browsers="firefox chrome"
14 # Note: We can't use xdg-open(1) here, as xdg-open itself tries to use
15 # $BROWSER, and this would result in an endless loop!
19 elinks w3m links2 links lynx
21 if [ -n "$commands[$browser]" ]; then
22 BROWSER="$commands[$browser]"
26 unset browser x11_browsers
29 [[ -n "$BROWSER" ]] && export BROWSER