diff options
author | Seppia <seppia@seppia.net> | 2018-06-03 13:02:29 +0200 |
---|---|---|
committer | Seppia <seppia@seppia.net> | 2018-06-03 13:02:29 +0200 |
commit | d89c4a44964ec9a1e946132c37e5322310724a89 (patch) | |
tree | 3186f2b005e83cd33617a08a3fb545340d356758 | |
parent | d826e70119d26f6166da2f8597d33fb4b2737e31 (diff) | |
download | repofish-d89c4a44964ec9a1e946132c37e5322310724a89.tar.gz repofish-d89c4a44964ec9a1e946132c37e5322310724a89.tar.bz2 repofish-d89c4a44964ec9a1e946132c37e5322310724a89.zip |
Search text style
Styled search keywords string in search function.
-rwxr-xr-x | repo.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)"'/' } |