From 5683c51d17b5eed7d2f070aa4e49cc21b65d82e5 Mon Sep 17 00:00:00 2001 From: gramanas Date: Mon, 29 Oct 2018 17:20:28 +0200 Subject: Add list with basename and update readme --- src/actionhelper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/actionhelper.c') diff --git a/src/actionhelper.c b/src/actionhelper.c index 6428ab0..5899024 100644 --- a/src/actionhelper.c +++ b/src/actionhelper.c @@ -202,6 +202,7 @@ ListOpt list_make_options(cklist *args) { ._lst = LST_PLAIN, .pName = NULL, .attr = 0, + .bName = 0, .err = 0 }; @@ -211,6 +212,10 @@ ListOpt list_make_options(cklist *args) { listOpt.attr = 1; continue; } + if (strcmp(list_get(args), "-b") == 0) { + listOpt.bName = 1; + continue; + } if (strcmp(list_get(args), "-t") == 0) { if (!list_next(args)) { listOpt.err = 1; @@ -421,7 +426,8 @@ void print_LIST_help() { ckhelp(" `-p program_name`: list only the configs of the specified program."); ckhelp(" `ckconf`: list the ck configuration values.\n"); ckhelp("There are also some flags:"); - ckhelp(" `-a`: add the attributes next to the config paths (secret,primary)"); + ckhelp(" `-a`: add the attributes next to the config paths (secret,primary,root)"); + ckhelp(" `-b`: print the config basenames instead of the full path"); ckhelp(" `-t`: change the list type. (does not work with tree or ckconf)"); ckhelp(" `plain`: default plain listing"); ckhelp(" `python`: enclose the list in [ , ]"); -- cgit v1.2.3