https://github.com/d8660091/td
terminal dictionary
https://github.com/d8660091/td
Last synced: about 2 months ago
JSON representation
terminal dictionary
- Host: GitHub
- URL: https://github.com/d8660091/td
- Owner: d8660091
- Created: 2015-04-06T03:11:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-03T14:00:06.000Z (almost 10 years ago)
- Last Synced: 2025-02-05T18:52:10.786Z (3 months ago)
- Size: 8.92 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TD
A native terminal dictionary, with a few lines in bash and a collection of txt dictionaries.## Usage
1. Download the txt dictionaries to *dictPath*
2. Put following lines to your zshrc or bashrc
```bash
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'
}
```
## Demo
