forked from crony/udict
Compare commits
No commits in common. "c19da56ab536acb33a877435f4445b9dc4ebe3ae" and "ae75c9392162c65325b4f6c2f0ccecddc4134bce" have entirely different histories.
c19da56ab5
...
ae75c93921
12
Makefile
12
Makefile
@ -1,12 +0,0 @@
|
||||
PREFIX = /usr/local
|
||||
|
||||
make:
|
||||
@echo "usage: make [install|uninstall]"
|
||||
|
||||
install:
|
||||
mkdir -p ${PREFIX}/bin
|
||||
cp -f udict ${PREFIX}/bin
|
||||
chmod 755 ${PREFIX}/bin/udict
|
||||
|
||||
uninstall:
|
||||
rm -f ${PREFIX}/bin/udict
|
@ -6,11 +6,9 @@ Simple script that uses simple dictionary to get the most liked/correct definiti
|
||||
|
||||
```bash
|
||||
$ udict smh
|
||||
meaning, "shaking my head", smh is typically used when something is obvious, plain old stupid, or disappointment.
|
||||
meaning, "[shaking my head]", smh is typically used when something is obvious, [plain old stupid], or [disappointment].
|
||||
```
|
||||
|
||||
## Installation
|
||||
> as root
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
||||
just copy the script to your path
|
||||
|
4
udict
4
udict
@ -7,6 +7,4 @@ term="$@"
|
||||
|
||||
term="$(printf '%s\n' "${term}" | sed 's/ /\\/g' )"
|
||||
|
||||
curl -s "https://api.urbandictionary.com/v0/define?term=${term}" |
|
||||
jq -r '.list[0].definition' |
|
||||
sed 's/\[/\o033[1m/g;s/\]/\o033[0m/g'
|
||||
curl -s "https://api.urbandictionary.com/v0/define?term=${term}" | jq -r '.list[0].definition'
|
||||
|
Loading…
Reference in New Issue
Block a user