aboutsummaryrefslogtreecommitdiffstats
path: root/src/actionparser.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-08-18 18:44:14 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-08-18 18:44:14 +0300
commit0f33c8a9cbabda257c4dd73009266a4cf5f857a7 (patch)
tree1b0ca0c9a3d06b6ccd32c456f8fe8d84cb153093 /src/actionparser.c
parentffc33043a488ecf038d8414fc8af1e99389619f8 (diff)
downloadck-0f33c8a9cbabda257c4dd73009266a4cf5f857a7.tar.gz
ck-0f33c8a9cbabda257c4dd73009266a4cf5f857a7.tar.bz2
ck-0f33c8a9cbabda257c4dd73009266a4cf5f857a7.zip
steps towards list
Diffstat (limited to 'src/actionparser.c')
-rw-r--r--src/actionparser.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/actionparser.c b/src/actionparser.c
index 55fe79c..4b8ed6b 100644
--- a/src/actionparser.c
+++ b/src/actionparser.c
@@ -114,7 +114,7 @@ int parse_EDIT(UserOpt *opt) {
int parse_LIST(UserOpt *opt) {
/* List expects a maximum of than 2 arguments */
if (optNum > pos + 2) {
- opt->err = PERR_EDIT_WRONG;
+ opt->err = PERR_LIST_WRONG;
return -1;
}
@@ -196,6 +196,7 @@ void get_config(UserOpt *opt) {
exit(1);
}
if (strcmp(token, ".") == 0){
+ /* WHAT? */
printf("Dot\n");
}
if (!util_is_dir(token)) {
@@ -262,13 +263,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 ProgramName ConfigPath [-s](secret) [-p](primary)", names);
+ sprintf(errStr, "Delete config or program\nUsage: %s ....", names);
break;
case PERR_EDIT_WRONG:
sprintf(errStr, "Edit config with $EDITOR\nUsage: %s ProgramName or configBasename (or both)", names);
break;
case PERR_LIST_WRONG:
- sprintf(errStr, "Usage: .........)");
+ sprintf(errStr, "List programs, configs and more\nUsage: %s [list-type] value-to-list", names);
break;
case PERR_SEARCH_WRONG:
sprintf(errStr, "Usage: .............");