about summary refs log tree commit diff
path: root/Completion/Unix/Command/_w3m
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2002-04-25 15:19:20 +0000
committerClint Adams <clint@users.sourceforge.net>2002-04-25 15:19:20 +0000
commit43a7b9b87756d53d4bf3ca861523083cc13e91f6 (patch)
tree1bc347ea8b4b603ade58c4cda22c3894a850431b /Completion/Unix/Command/_w3m
parentff3e8d6ee5188e4322c59e297687351bd20dee7b (diff)
downloadzsh-43a7b9b87756d53d4bf3ca861523083cc13e91f6.tar.gz
zsh-43a7b9b87756d53d4bf3ca861523083cc13e91f6.tar.xz
zsh-43a7b9b87756d53d4bf3ca861523083cc13e91f6.zip
17045: complete all files for w3m, not just *.html.
Diffstat (limited to 'Completion/Unix/Command/_w3m')
-rw-r--r--Completion/Unix/Command/_w3m48
1 files changed, 48 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_w3m b/Completion/Unix/Command/_w3m
new file mode 100644
index 000000000..5f1eee59c
--- /dev/null
+++ b/Completion/Unix/Command/_w3m
@@ -0,0 +1,48 @@
+#compdef w3m
+
+local curcontext="$curcontext" state line
+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' && return 0
+
+case $state in
+	url)
+	local _w3mhistory
+
+	if [[ -s ~/.w3m/history ]]; then
+	   _w3mhistory=(${(f)"$(<$HOME/.w3m/history)"})
+	   compadd $_w3mhistory
+	fi
+
+	_urls -f
+	;;
+
+esac