skx / cpmulator

Golang CP/M emulator for zork, Microsoft BASIC, Turbo Pascal, Wordstar, lighthouse-of-doom, etc
MIT License
98 stars 3 forks source link

Introduce a little support for console history. #115

Closed skx closed 2 months ago

skx commented 2 months ago

This pull-request adds some minimal improvements to our text-line input:

Ctrl-N and Ctrl-P navigate through prior history, and Escape erases any input in-progress. This is short of full history, with searches and more, but better than nothing.

NOTE: History is not persisted to disk.

Using this support long commands in the CCP work as expected, but I guess all input reading using the "Get Line" rather than the "Get Character" will work :)