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 from the screen. For this, you can simply print a "\b" character to the screen. This will act as the backspace. Remember also to remove the character from the buffer you are using to store the
input. Here are the byte values for the delete and backspace characters:
delete --> 127
backspace --> 8
When the user presses delete or backspace, it should remove a character from the screen. But, it should not remove any of the prompts. For example, if the console looks like the following after the user typed the character "a",
/home/ p r o j e c t s / cs200 / spring12 / s h e l l >a
then if the user presses the backspace twice, the console should still look like:
/home/ p r o j e c t s / cs200 / spring12 / s h e l l >
Notice that the prompt is still intact.