aboutsummaryrefslogtreecommitdiffstats
path: root/src/actionparser.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-10-09 20:53:30 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-10-09 20:53:30 +0300
commit598e0522de924a50ea9c640955daab8512029eb4 (patch)
tree3f3cf027349a414e2f24d1a4c7976916e8b7dc21 /src/actionparser.c
parentfe781e5ae7116733e5b335a0ac016af97266db5f (diff)
downloadck-598e0522de924a50ea9c640955daab8512029eb4.tar.gz
ck-598e0522de924a50ea9c640955daab8512029eb4.tar.bz2
ck-598e0522de924a50ea9c640955daab8512029eb4.zip
Better list
Diffstat (limited to 'src/actionparser.c')
-rw-r--r--src/actionparser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/actionparser.c b/src/actionparser.c
index 7c1186a..1da1d2f 100644
--- a/src/actionparser.c
+++ b/src/actionparser.c
@@ -130,7 +130,7 @@ int parse_EDIT(UserOpt *opt) {
int parse_LIST(UserOpt *opt) {
/* List expects a maximum of than 3 arguments */
- if (optNum <= pos || optNum > pos + 4) {
+ if (optNum <= pos || optNum > pos + 5) {
opt->err = PERR_LIST_WRONG;
return -1;
}
@@ -329,13 +329,13 @@ void print_parser_error(UserOpt *opt) {
sprintf(errStr, "Add config \nUsage: %s ProgramName ConfigPath [-s](secret) [-p](primary)", names);
break;
case PERR_DEL_WRONG:
- sprintf(errStr, "Delete config or program\nUsage: %s ....", names);
+ sprintf(errStr, "Delete config or program\nUsage: %s {ProgramName} | {-c ConfigPath (as shown by ck list)}", names);
break;
case PERR_EDIT_WRONG:
sprintf(errStr, "Edit config with $EDITOR (%s)\nUsage: %s ProgramName [configBasename]", getenv("EDITOR"), names);
break;
case PERR_LIST_WRONG:
- sprintf(errStr, "List programs, configs and more\nUsage: %s value-to-list (or tree) [-t list-type] [-a]", names);
+ sprintf(errStr, "List programs, configs and more\nUsage: %s {programs|paths|-p ProgramName} [-t list-type] | {tree | ckconf} [-a]", names);
break;
case PERR_SEARCH_WRONG:
sprintf(errStr, "Search through the configs with grep\nUsage: %s search-term", names);
@@ -344,7 +344,7 @@ void print_parser_error(UserOpt *opt) {
sprintf(errStr, "Usage: ........");
break;
}
- ERR("%s", errStr);
+ HELP("%s", errStr);
}
void print_parser_help() {