i'm about to implement the command line interface for my os, but something confused me.
As i know, the prototype of a shell is :
Code: Select all
oid shell_init()
{
while(1) {
puts("$ ");
/* type the command first */
/*(1)*/then reading it from console buffer;
parsing the command buffer;
run the command;
}
}
How can i stop (1) be happened before the command totally be entered?
if not solve this, as you can see from the above code, it'll puts "$ " at all the time.
Have any body have ideas?
and i would appreciate it very much if some one give me some useful information about CLI.
Thanks!
negcit.K