From bae2e573bf407cebf2b9aa01c79bb2decceb2682 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 8 Jun 2023 20:27:03 +0200 Subject: [PATCH] words between brackets are bold. --- README.md | 2 +- udict | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d94189..5eb3ce5 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 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 diff --git a/udict b/udict index cce398c..84ba4b4 100755 --- a/udict +++ b/udict @@ -7,4 +7,6 @@ term="$@" 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'