From 565f5287a0b913e01df5b9a90211359dc3fd86a2 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Mon, 29 May 2023 22:36:38 -0400 Subject: [PATCH] keep only perl to get rid of the html --- dictpopup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dictpopup b/dictpopup index ccb5a50..85db824 100755 --- a/dictpopup +++ b/dictpopup @@ -8,8 +8,7 @@ dict_lookup=$(sdcv -n --utf8-output -e "$word") if echo "$dict_lookup" | grep -F -q "Nothing similar to"; then popup "$dict_lookup" else - output=$(echo "$dict_lookup" | tail -n +5 | sed 's|
|\n|g' | sed 's|<[^>]*>||g') - output=$(echo "$output" | sed -E 's/&(amp|lt|gt|quot);/\1/g') + output=$(echo "$dict_lookup" | tail -n +5 | sed 's|
|\n|g') output=$(echo "$output" | perl -pe 's/<[^>]*>//g') printf '%s\0' "$output" | xargs -0 -I {} sh -c 'popup "$@"' _ {} fi