aboutsummaryrefslogtreecommitdiffstats
path: root/src/action.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/action.c')
-rw-r--r--src/action.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/action.c b/src/action.c
index 0e48599..1f8f8c3 100644
--- a/src/action.c
+++ b/src/action.c
@@ -172,6 +172,7 @@ void pkg_action_search(const char *pattern){
for(iterator = 0; iterator < pkgs->pkg_count; iterator++ ){
if(
+ /* search pkg name */
( regexec(
&search_regex.regex,
pkgs->pkgs[iterator]->name,
@@ -180,6 +181,7 @@ void pkg_action_search(const char *pattern){
0
) == 0)
||
+ /* search pkg description */
( regexec(
&search_regex.regex,
pkgs->pkgs[iterator]->description,
@@ -187,6 +189,15 @@ void pkg_action_search(const char *pattern){
search_regex.pmatch,
0
) == 0)
+ ||
+ /* search pkg location */
+ ( regexec(
+ &search_regex.regex,
+ pkgs->pkgs[iterator]->location,
+ search_regex.nmatch,
+ search_regex.pmatch,
+ 0
+ ) == 0)
){
char *short_description = gen_short_pkg_description(pkgs->pkgs[iterator]);
printf("%s - %s\n",pkgs->pkgs[iterator]->name,short_description);