Break keys, Computer Engineering

Like a normal read, your input should break on the new line character "\n"  and also on the up and down arrow keys. You will process the input made by the user when he/she enters new line.

History

Your shell must keep a history of the last 10 commands executed. When the user presses the up key the current input should show the last command executed (as the user typed it). So if the user executed the "ls" command, then pressed the up key, then pressed enter, the ls command should be executed. When the user presses up multiple times, you should replace the input with the next previous command. Until you reach the end of the history list (max of 10). If the user presses up and reaches the end of the list, the next time up is pressed nothing should happen. Conversely when the down arrow is pressed you should cycle through the history in the other direction. So if

the user presses down without pressing up, nothing should happen. That is because you will be at the bottom of the list. After a command is executed it should be added to the list and the index of where the user is in the history should be reset. This functionality should be similar to how the Bash shell works.

Posted Date: 4/3/2013 2:58:56 AM | Location : United States







Related Discussions:- Break keys, Assignment Help, Ask Question on Break keys, Get Answer, Expert's Help, Break keys Discussions

Write discussion on Break keys
Your posts are moderated
Related Questions
A 6-bit Dual Slope A/D converter uses a reference of -6V and a 1 MHz clock. It uses a fixed count of 40 (101000). Find Maximum Conversion Time.         Ans. The time T 1 specifie

Design a BCD to excess 3 code converter using minimum number of NAND gates. Hint: use k map techniques. Ans. Firstly we make the truth table: BCD no

Q. Show the example of internet address? The following can be a typical person understandable address on Internet: VVS @ expertsmind.us VVS is an username which in gene

Give example of stack using encapsulation of OOA An example of the Stack.  A Stack abstraction provides methods like pop (), push (), isEmpty(), isFull(). The Stack can be i

why we don''t use register at the place of ram?

Discuss program testing and debugging in detail. In program debugging and testing significant steps are as follows: a. For the program, construction of test data b. Analy

Opening Files for Reading Only     : A data file is a file that you can open and read its contents visually - for example, C source files, .dat files, HTML etc - anything that look

Constraint Satisfaction Problems: Furthermore I was perhaps most proud of AI on a Sunday. However this particular Sunday, a friend of mine found an article in the Observer reg

Q. Open System Interconnection Networking Model? An open system is a model which allows any two different systems to communicate regardless of their underlying architecture. Th

Explain Garbage collection In this method two passes are made over the memory to identify new areas. In the first pass it traverses all pointers pointing to allocated areas an