Changes in kernel/generic/src/console/kconsole.c [6b00876:dc0e41c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
r6b00876 rdc0e41c 362 362 putchar(current[position]); 363 363 364 if (position == 0) 365 continue; 364 366 365 367 /* … … 368 370 */ 369 371 size_t beg; 370 unsigned sp = 0, narg = 0; 371 if (position == 0) { 372 tmp[0] = '\0'; 373 beg = 0; 374 } 375 else { 376 for (beg = position - 1; (beg > 0) && (!isspace(current[beg])); 377 beg--); 378 379 if (isspace(current[beg])) 380 beg++; 381 382 wstr_to_str(tmp, position - beg + 1, current + beg); 383 } 384 385 /* Count which argument number are we tabbing (narg=0 is cmd) */ 386 for (; beg > 0; beg--) { 387 if (isspace(current[beg])) { 388 if (!sp) { 389 narg++; 390 sp = 1; 391 } 392 } 393 else 394 sp = 0; 395 } 396 if (narg && isspace(current[0])) 397 narg--; 398 372 for (beg = position - 1; (beg > 0) && (!isspace(current[beg])); 373 beg--); 374 375 if (isspace(current[beg])) 376 beg++; 377 378 wstr_to_str(tmp, position - beg + 1, current + beg); 379 399 380 int found; 400 if ( narg == 0) {381 if (beg == 0) { 401 382 /* Command completion */ 402 383 found = cmdtab_compl(tmp, STR_BOUNDS(MAX_CMDLINE), indev, … … 405 386 /* Arguments completion */ 406 387 cmd_info_t *cmd = parse_cmd(current); 407 if (!cmd || !cmd->hints_enum || cmd->argc < narg)388 if (!cmd || !cmd->hints_enum) 408 389 continue; 409 390 found = cmdtab_compl(tmp, STR_BOUNDS(MAX_CMDLINE), indev,
Note:
See TracChangeset
for help on using the changeset viewer.