Break keys, Computer Engineering

Assignment Help:

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.


Related Discussions:- Break keys

What about division and multiply operations, Q. What about division and mul...

Q. What about division and multiply operations? In most of the older computers divisions and multiply were implemented using subtract/add and shift micro-operations. If a digit

Delete command, When the user is inputting commands into your shell, it sho...

When the user is inputting commands into your shell, it should properly handle delete and backspace. When one of these characters is detected, you will need to remove one character

Describe website features and functionality, This assignment relates to all...

This assignment relates to all of the course objectives but more specifically to your practical understanding and evaluation of the key issues in relation to the development of the

Define swapping, Define swapping.  A process needs to be in memory to b...

Define swapping.  A process needs to be in memory to be implemented. Though a process can be swapped temporarily out of memory to a backing store and then brought back into mem

Define the key features of hop field neural networks, a. Define the Key fea...

a. Define the Key features of Hop field Neural Networks. b. Compare and contrast among Neural Networks and Expert systems in terms of knowledge representation, acquisition and e

Describe the properties of attributes and operations, Describe the properti...

Describe the properties of Attributesand operations Attributes are named slots for data values that belong to the class. Previously we have studied in MCS-024, different o

Prior conditions - logic programs, Prior Conditions - Logic programs: ...

Prior Conditions - Logic programs: However firstly there we must make sure that our problem has a solution. Whether one of the negative examples can be proved to be true from

How a file can be shared among different users, Discuss the different techn...

Discuss the different techniques with which a file can be shared among different users. Several popular techniques with that a file can be shared among various users are: 1

Commutatively of connectives - artificial intelligence, Commutatively of Co...

Commutatively of Connectives You will be aware from the fact that some arithmetic operators have a property that it does not matter which way around you give the operator input

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd