blob: 42663746a7ae42b310265566bb85ea69e4098515 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
if status is-interactive; and not fish_is_root_user
if test -z "$HOMEPAGE"
set -x HOMEPAGE "https://html.duckduckgo.com"
end
# Console browser to look for by order of preference
set -f browsers 'links' 'w3m' 'elinks' 'lynx'
# Find a suitable console web browser
set -f found_browser (find_prog $browsers)
if test -n "$found_browser"
# If $BROWSER is unset, set it
if test -z "$BROWSER"
set -x BROWSER $found_browser
end
function www --description "Browse the WWW"
if test -z $argv
$BROWSER $HOMEPAGE
return
end
$BROWSER $argv
end
end
end
|