Signed-off-by: Olivier Matz <zer0@droids-corp.org>
while (token->ops->complete_iterate(token,
&preparse.opaque,
tmpbuf,
- sizeof(tmpbuf)) == 0) {
+ sizeof(tmpbuf)) >= 0) {
debug_printf(" choice <%s>\n", tmpbuf);
debug_printf("Completion %s\n", tmpbuf);
/* we kept at least the room for one char */
- /* XXX to be updated for non-final completion */
if (ret == 0)
strcat(tmpbuf, " ");
*
* complete_iterate() copy in dstbuf (the size is specified in the
* parameter) the next possible completion for this token. Return 0 on
- * success or a negative value on error (or when there is no more
+ * success (final completion), 1 if it's an intermediate completion,
+ * or a negative value on error (or when there is no more
* completion). Refer to cmdline_complete_string_iterate() for an
* example.
*