add a routine to print the command history
all kinds of shenanigans to understand my terminals HOME/END keys