blob: 44448e8f8ba71efb2cc8498d4e4dbea3d8bbe20b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#autoload
local dict dictresult dictwords j expl
[[ -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
|