about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-03-06 16:22:10 +0000
committerClint Adams <clint@users.sourceforge.net>2001-03-06 16:22:10 +0000
commit439af5f4c5a45386acbae1618fecf5a721495561 (patch)
tree2accdc0773d3dbcab714efb80caee59b0dc50f64
parent684c9eebe52be2f8e7ef05df794f5213b5858555 (diff)
downloadzsh-439af5f4c5a45386acbae1618fecf5a721495561.tar.gz
zsh-439af5f4c5a45386acbae1618fecf5a721495561.tar.xz
zsh-439af5f4c5a45386acbae1618fecf5a721495561.zip
unposted: complete for w3m
-rw-r--r--ChangeLog4
-rw-r--r--Completion/User/_w3m48
2 files changed, 52 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ca512b8f..ab7b832b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-03-06  Clint Adams  <schizo@debian.org>
+
+	* unposted: Completion/User/_w3m: complete for w3m.
+
 2001-03-06  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 13576: Src/lex.c, Src/parse.c: make the parser use real memory
diff --git a/Completion/User/_w3m b/Completion/User/_w3m
new file mode 100644
index 000000000..f693a1e7c
--- /dev/null
+++ b/Completion/User/_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' \
+  '-cols:column width:' \
+  '-dump_source' \
+  '-dump_head' \
+  '+:goto line:' \
+  '-num[show line number]' \
+  '-no-proxy' \
+  '-no-mouse' \
+  '-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:configfile:_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 || _files -g '*.html'
+	;;
+
+esac