|
@@ -122,14 +122,12 @@ static kpargv_status_e ksession_parse_arg(ksession_t *session,
|
|
// That's time to add entry to completions list.
|
|
// That's time to add entry to completions list.
|
|
if (!kpargv_continuable(pargv))
|
|
if (!kpargv_continuable(pargv))
|
|
kpargv_add_completions(pargv, entry);
|
|
kpargv_add_completions(pargv, entry);
|
|
- return KPARSE_INCOMPLETED;
|
|
|
|
- } else {
|
|
|
|
- // Add entry to completions if it's last incompleted arg.
|
|
|
|
- if (faux_argv_is_last(*argv_iter) &&
|
|
|
|
- kpargv_continuable(pargv)) {
|
|
|
|
- kpargv_add_completions(pargv, entry);
|
|
|
|
- return KPARSE_NOTFOUND;
|
|
|
|
- }
|
|
|
|
|
|
+ return KPARSE_NOTFOUND;
|
|
|
|
+ // Add entry to completions if it's last incompleted arg.
|
|
|
|
+ } else if (faux_argv_is_last(*argv_iter) &&
|
|
|
|
+ kpargv_continuable(pargv)) {
|
|
|
|
+ kpargv_add_completions(pargv, entry);
|
|
|
|
+ return KPARSE_NOTFOUND;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -239,6 +237,10 @@ fprintf(stderr, "%s: %s\n", kentry_name(nested), kpargv_status_decode(nrc));
|
|
rc = nrc;
|
|
rc = nrc;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
+ if ((min > 0) && (KPARSE_INCOMPLETED == nrc)) {
|
|
|
|
+ rc = nrc;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
// Not found necessary number of mandatory instances
|
|
// Not found necessary number of mandatory instances
|
|
if (num < min) {
|
|
if (num < min) {
|
|
if (KPARSE_INPROGRESS == nrc)
|
|
if (KPARSE_INPROGRESS == nrc)
|