about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:48:02 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:48:02 +0000
commitcf14fbc79cc62abf58433c46d76be4eb7669a5ef (patch)
treefcceef9a70aab0b1ad597ecb738b3ca2e1de40f2 /Completion/Unix/Command
parentb73d95f272316ef1dd256c4d986452d5d0980e0a (diff)
downloadzsh-cf14fbc79cc62abf58433c46d76be4eb7669a5ef.tar.gz
zsh-cf14fbc79cc62abf58433c46d76be4eb7669a5ef.tar.xz
zsh-cf14fbc79cc62abf58433c46d76be4eb7669a5ef.zip
moved from Completion/User/_dict
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_dict66
1 files changed, 66 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_dict b/Completion/Unix/Command/_dict
new file mode 100644
index 000000000..228603dbe
--- /dev/null
+++ b/Completion/Unix/Command/_dict
@@ -0,0 +1,66 @@
+#compdef dict
+
+local expl dictresults dictwords j dict
+
+_dictwords() {
+
+[[ -z $words[CURRENT] ]] && return 1
+
+dictresults=(${${(f)${"$(dict -m $words[CURRENT])":gs/    
+  / /}}:#[0-9]*matches found})
+
+for j in ${dictresults}
+do
+dict=${j%%:*}
+dictwords=(${(z)j#*:})
+
+_wanted $dict expl "words from $dict" \
+  compadd -M 'm:{a-zA-Z}={A-Za-z} r:|=*' -a "$@" - dictwords
+done
+}
+
+_arguments \
+	'(--host)-h[host]:dict server:_hosts' \
+	'(-h)--host:dict server:_hosts' \
+	'(--port)-p[port]:service:' \
+	'(-p)--port:service:' \
+	'(--database)-d[database]:db name:' \
+	'(-d)--database:db name:' \
+	'(--match)-m[match]' \
+	'(-m)--match' \
+	'(--strategy)-s[strategy]:strategy:' \
+	'(-s)--strategy:strategy:' \
+	'(--nocorrect)-C[nocorrect]' \
+	'(-C)--nocorrect' \
+	'(--config)-c[config]:config file:_files' \
+	'(-c)--config:config file:_files' \
+	'(--dbs)-D[list dbs]' \
+	'(-D)--dbs' \
+	'(--strats)-S[strats]' \
+	'(-S)--strats' \
+	'(--serverhelp)-H[server help]' \
+	'(-H)--serverhelp' \
+	'(--info)-i[db info]:db name:' \
+	'(-i)--info:db name:' \
+	'(--noauth)-a[disable authentication]' \
+	'(-a)--noauth' \
+	'(--user)-u[user]:user name:' \
+	'(-u)--user:user name:' \
+	'(--key)-k[key]:shared secret:' \
+	'(-k)--key:shared secret:' \
+	'(--version)-V[display version]' \
+	'(-V)--version' \
+	'(--license)-L[display license]' \
+	'(-L)--license' \
+	'--help' \
+	'(--verbose)-v[be verbose]' \
+	'(-v)--verbose' \
+	'(--raw)-r[be very verbose]' \
+	'(-r)--raw' \
+	'(--pager)-P[pager]:program:_command_names -e' \
+	'(-P)--pager:_command_names -e:' \
+	'--html' \
+	'--pipesize:buffer size:' \
+	'--client:client text:' \
+	'--debug:debug flag:(verbose raw scan parse pipe serial time)' \
+	':word:_dictwords'