about summary refs log tree commit diff
path: root/Completion/Unix/Command/_w3m
blob: 02a995a9202018b462e0f701fc6b7d9823013c1d (plain) (blame)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#compdef w3m

local curcontext="$curcontext" state line ret=1
typeset -A opt_args

_arguments \
  '-t[tabwidth]:tabwidth:' \
  '-r[ignore backspace effect]' \
  '-l[preserved lines]:number of lines:' \
  '-B[load bookmark]' \
  '-bookmark:bookmark file:_files' \
  '-T[content-type]:content type:' \
  '-m[internet message mode]' \
  '-v[visual startup mode]' \
  '-M[monochrome display]' \
  '-F[automatically render frame]' \
  '(-dump_source -dump_head)-dump' \
  '-cols:column width:' \
  '(-dump -dump_head)-dump_source' \
  '(-dump -dump_source)-dump_head' \
  '+:goto line:' \
  '-num[show line number]' \
  '-no-proxy' \
  '-no-mouse' \
  '(-no-cookie)-cookie' \
  '(-cookie)-no-cookie' \
  '-no-graph' \
  '-S[squeeze multiple blank lines]' \
  '-W[toggle wrap search mode]' \
  '-X[do not use termcap init/deinit]' \
  '-o[option]:option-value:' \
  '-config:config file:_files' \
  '-debug' \
  ':url:->url' && ret=0

case $state in
	url)
	local _w3mhistory

	if [[ -s ~/.w3m/history ]]; then
	   _w3mhistory=(${(f)"$(<$HOME/.w3m/history)"})
	   compadd $_w3mhistory && ret=0
	fi

	_urls -f && ret=0
	;;

esac

return ret