From 69509a92c517340e174afb0109c1167b60093934 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sun, 6 Aug 2023 14:18:21 -0400 Subject: [PATCH] Update dictpopup improve formating --- dictpopup | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dictpopup b/dictpopup index eb8fbd0..4c91b3e 100755 --- a/dictpopup +++ b/dictpopup @@ -1,5 +1,6 @@ #!/bin/sh + word=${1:-$(sselp)} word_without_spaces=$(echo "$word" | tr -d ' ') @@ -8,5 +9,5 @@ dict_lookup=$(sdcv -n --utf8-output -e "$word_without_spaces") if echo "$dict_lookup" | perl -0777 -ne 'exit 0 if /Nothing similar to/; exit 1'; then echo "$dict_lookup" | popup else - echo "$dict_lookup" | perl -0777 -pe 's/^.*\n.*\n.*\n.*\n//; s/<[^>]*>//g' | popup + echo "$dict_lookup" | perl -0777 -pe 's/^.*\n.*\n.*\n.*\n//; s/<[^>]*>//g; s/(--->|-->)//g;' | popup fi