petty variable name cleanup (extractrange->extractblock)
closes #21 log command click = fill command entry

When clicking the command in log, it fills the command entry box,
if it was empty.

Bonus: this required the code to remember command history in an
array to avoid the mess of escaping and unescaping. So implemented
command history too. Pressing ctrl+up or ctrl+down when the command
entry is empty cycles through the command history.