Highlight search keywords in results
This commit is contained in:
parent
0c7f1d7e8d
commit
899ba881a6
14
saury
14
saury
|
@ -102,7 +102,12 @@ function aur_search
|
||||||
set_color --bold
|
set_color --bold
|
||||||
echo -n (string join "" \
|
echo -n (string join "" \
|
||||||
(set_color CC3399) "aur/" \
|
(set_color CC3399) "aur/" \
|
||||||
(set_color normal; set_color --bold) "$name")
|
(set_color normal; set_color --bold) (string replace -a -i \
|
||||||
|
"$query" \
|
||||||
|
(string join "" (set_color 33CCB3) \
|
||||||
|
"$query" \
|
||||||
|
(set_color normal; set_color --bold)) \
|
||||||
|
"$name"))
|
||||||
echo -n ' '
|
echo -n ' '
|
||||||
|
|
||||||
if test $out_of_date = "true"
|
if test $out_of_date = "true"
|
||||||
|
@ -144,7 +149,12 @@ function aur_search
|
||||||
echo
|
echo
|
||||||
|
|
||||||
set_color normal
|
set_color normal
|
||||||
echo " $description"
|
echo (string replace -a -i \
|
||||||
|
"$query" \
|
||||||
|
(string join "" (set_color 33CCB3) \
|
||||||
|
"$query" \
|
||||||
|
(set_color normal)) \
|
||||||
|
" $description")
|
||||||
end
|
end
|
||||||
else if test "$rpc_response_type" = "error"
|
else if test "$rpc_response_type" = "error"
|
||||||
set rpc_error (echo $rpc_response | jq -r '.error')
|
set rpc_error (echo $rpc_response | jq -r '.error')
|
||||||
|
|
Loading…
Reference in New Issue