Compare commits

...

2 Commits

Author SHA1 Message Date
e9ff47bab6 Merge pull request 'words between brackets are bold.' (#1) from TlasT/udict:bold into main
Reviewed-on: #1
I will allow this
2023-06-08 18:55:46 +00:00
Raymaekers Luca
10976e8340 words between brackets are bold. 2023-06-08 20:32:39 +02:00
2 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Simple script that uses simple dictionary to get the most liked/correct definiti
```bash ```bash
$ udict smh $ 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 ## Installation

4
udict
View File

@ -7,4 +7,6 @@ term="$@"
term="$(printf '%s\n' "${term}" | sed 's/ /\\/g' )" term="$(printf '%s\n' "${term}" | sed 's/ /\\/g' )"
curl -s "https://api.urbandictionary.com/v0/define?term=${term}" | jq -r '.list[0].definition' curl -s "https://api.urbandictionary.com/v0/define?term=${term}" |
jq -r '.list[0].definition' |
sed 's/\[/\o033[1m/g;s/\]/\o033[0m/g'