aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c
index 7d5276a..c084e8f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -199,6 +199,9 @@ ListOpt make_list_options(cklist *args) {
else if (strcmp(list_get(args), "programs") == 0) {
listOpt._lt = LT_PROGRAM;
}
+ else if (strcmp(list_get(args), "tree") == 0) {
+ listOpt._lt = LT_TREE;
+ }
else {
listOpt.err = 1;
}
@@ -209,6 +212,7 @@ ListOpt make_list_options(cklist *args) {
}
int run_LIST(UserOpt *opt, Conf *conf) {
+ UNUSED(conf);
DB db = open_DB(opt);
if (db.ptr == NULL) {
if (db.error == SQL_ERR_NO_TABLES) {
@@ -232,6 +236,12 @@ int run_LIST(UserOpt *opt, Conf *conf) {
case LT_PROGRAM:
list_get_programs(&db, list_type);
break;
+ case LT_TREE:
+ list_get_path_program_tree(&db, list_type);
+ list_print(list_type);
+ close_DB(&db);
+ list_free(list_type);
+ return 1;
case LT_NONE:
printf("What should I list? (paths, configs)\n");
close_DB(&db);