A native terminal dictionary, with a few lines in bash and a collection of txt dictionaries.
- Download the txt dictionaries to dictPath
- Put following lines to your zshrc or bashrc
unalias d
d() {
blue=`echo -e "\e[1m\e[34m"` # specify format for dictionary name and word being looked in urxvt.
norm=`echo -e "\e[0m"` # normal format in urxvt.
dictPath=~/Dropbox/dictionaries/ # change this to your dictionaries' path
pcregrep -M "^$1\n.*" ${dictPath}*.txt \
| sed "s/\/home.*dictionaries\/\(.*\)\.txt\(.*\)/${blue}\1\2${norm}/" \
| perl -pe 's/(interj|n|v|adj|adv|conj|pron|prep)(?=\.)/\n\1/g'
}