瀏覽代碼

If no command is found print info

Johannes Zellner 8 月之前
父節點
當前提交
7c3e9d02ab
共有 1 個文件被更改,包括 6 次插入 和 0 次删除
  1. 6 0
      terminal.c

+ 6 - 0
terminal.c

@@ -237,6 +237,12 @@ void terminal_run(void)
 						io_putstr("drive ");
 						io_putchar((char)('0' + disk_get_drive()));
 						io_putstr(" selected\n");
+					} else {
+						unsigned int i = 0;
+						while (i < line_len && line[i] == ' ')
+							i++;
+						if (i < line_len)
+							io_putstr("command not found\n");
 					}
 					line_len  = 0;
 					line_pos  = 0;