From 598e0522de924a50ea9c640955daab8512029eb4 Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 9 Oct 2018 20:53:30 +0300 Subject: Better list --- src/actionparser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/actionparser.c') 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() { -- cgit v1.2.3