Lines Matching full:line
195 /* clear line buffer before switch to new device */ in finsh_set_device()
196 memset(shell->line, 0, sizeof(shell->line)); in finsh_set_device()
356 void finsh_run_line(struct finsh_parser *parser, const char *line) in finsh_run_line() argument
362 finsh_parser_run(parser, (unsigned char *)line); in finsh_run_line()
415 rt_kprintf("%s%s", FINSH_PROMPT, shell->line); in shell_handle_history()
427 if (memcmp(&shell->cmd_history[FINSH_HISTORY_LINES - 1], shell->line, FINSH_CMD_SIZE)) in shell_push_history()
437 memcpy(&shell->cmd_history[index][0], shell->line, shell->line_position); in shell_push_history()
446 …y_count == 0 || memcmp(&shell->cmd_history[shell->history_count - 1], shell->line, FINSH_CMD_SIZE)) in shell_push_history()
450 … memcpy(&shell->cmd_history[shell->history_count][0], shell->line, shell->line_position); in shell_push_history()
546 memcpy(shell->line, &shell->cmd_history[shell->current_history][0], in finsh_thread_entry()
548 shell->line_curpos = shell->line_position = strlen(shell->line); in finsh_thread_entry()
568 memcpy(shell->line, &shell->cmd_history[shell->current_history][0], in finsh_thread_entry()
570 shell->line_curpos = shell->line_position = strlen(shell->line); in finsh_thread_entry()
589 rt_kprintf("%c", shell->line[shell->line_curpos]); in finsh_thread_entry()
603 /* move the cursor to the beginning of line */ in finsh_thread_entry()
608 shell_auto_complete(&shell->line[0]); in finsh_thread_entry()
610 shell->line_curpos = shell->line_position = strlen(shell->line); in finsh_thread_entry()
628 rt_memmove(&shell->line[shell->line_curpos], in finsh_thread_entry()
629 &shell->line[shell->line_curpos + 1], in finsh_thread_entry()
631 shell->line[shell->line_position] = 0; in finsh_thread_entry()
633 rt_kprintf("\b%s \b", &shell->line[shell->line_curpos]); in finsh_thread_entry()
642 shell->line[shell->line_position] = 0; in finsh_thread_entry()
648 /* handle end of line, break */ in finsh_thread_entry()
660 msh_exec(shell->line, shell->line_position); in finsh_thread_entry()
666 /* add ';' and run the command line */ in finsh_thread_entry()
667 shell->line[shell->line_position] = ';'; in finsh_thread_entry()
669 if (shell->line_position != 0) finsh_run_line(&shell->parser, shell->line); in finsh_thread_entry()
676 memset(shell->line, 0, sizeof(shell->line)); in finsh_thread_entry()
681 /* it's a large line, discard it */ in finsh_thread_entry()
690 rt_memmove(&shell->line[shell->line_curpos + 1], in finsh_thread_entry()
691 &shell->line[shell->line_curpos], in finsh_thread_entry()
693 shell->line[shell->line_curpos] = ch; in finsh_thread_entry()
695 rt_kprintf("%s", &shell->line[shell->line_curpos]); in finsh_thread_entry()
703 shell->line[shell->line_position] = ch; in finsh_thread_entry()
713 /* clear command line */ in finsh_thread_entry()