Motivation
Code does not write itself. Although it was raining today, I needed to find a hook to get myself interested in this project. So, in order to motivate myself to implement a replacement from scratch, I took my inspiration from the AmigaDOS shell.

A thing of marvel, my goal was to get something that looked and appeared to work as close to it as possible.
Challenges
I had a little trouble getting the text to wrap right. Whenever a word which was longer than the width of the window was entered, the text entry continued off unseen outside the right of the window, resulting in the addition of a horizontal scrollbar. With a little CSS research, this was fixed by adding the following two lines:
word-wrap: break-word;There is, I have just noticed, one remaining bug. Because the console text is directly manipulated HTML, consecutive spaces are not displayed. I need to add the following:
overflow-y: scroll;
white-space: pre-wrapAnd finally, when you've entered enough lines to bring the vertical scrollbar into play, it doesn't automatically scroll. I still need to look into that.
Result
Eventually, I had to decide whether I was going to concentrate on functionality or the detail of its appearance, and functionality was the obvious winner. In its current state, the terminal supports the following:
- Dragging the "window".
- Text entry.
- Movement of the cursor within the current line being entered.
- The enter key starting a new line.
- The backspace key removing the character before the cursor.
- The del key removing the character under the cursor.
No comments:
Post a Comment