summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <seppia@seppia.net>2018-06-03 13:02:29 +0200
committerSeppia <seppia@seppia.net>2018-06-03 13:02:29 +0200
commitd89c4a44964ec9a1e946132c37e5322310724a89 (patch)
tree3186f2b005e83cd33617a08a3fb545340d356758
parentd826e70119d26f6166da2f8597d33fb4b2737e31 (diff)
downloadrepofish-d89c4a44964ec9a1e946132c37e5322310724a89.tar.gz
repofish-d89c4a44964ec9a1e946132c37e5322310724a89.tar.bz2
repofish-d89c4a44964ec9a1e946132c37e5322310724a89.zip
Search text style
Styled search keywords string in search function.
-rwxr-xr-xrepo.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/repo.sh b/repo.sh
index 4bc1bc2..81c743f 100755
--- a/repo.sh
+++ b/repo.sh
@@ -114,8 +114,8 @@ search_packages() {
OUT_STR=$(jq -r '.results | .[] | [.Name, .Version], .Description' <<< ${CURL_JSN})
SEARCH_OUT=$(sed -e 's/\\//g' -e 's/\[/\\033\[1\;36m\[/g' -e 's/",/\\033\[1\;33m", \[\\033\[1\;32m/g' \
-e 's/\]/\\033\[1\;33m\]\\033\[1\;37m\]/g' <<< ${OUT_STR})
- echo -n 'You searched using the following keywords (matching package name and/or description): "'
- echo ${key[@]}\"
+ echo -ne ' \033[1;34m:: \033[1;37mYou searched using the following keywords (matching package name and/or description): "'
+ echo -ne \\033\[1\;33m${key[@]}\\033\[1\;37m\"
echo -e ${SEARCH_OUT} | sed -e 's/\[ /\n/g' -e 's/ *\] /\n\t/g' -e 's/", / /g' -e 's/"//g' | \
sed -E '/'"${LIST_INST::-1}"'[^-]/ s/$/ '"$(echo -e \\033\[1\;35m[ Installed ]\\033\[1\;37m)"'/'
}