Use ! to repeat the last command typed at the keyboard.
Use ^ to replace a string from the last command with a new string. The syntax is the same as in csh: "^old-string^replacement" For example:
: tell mycrof Hi there, how are you? No-one by that name here. : ^mycrof^mycroft You tell Mycroft, 'Hi there, how are you?' > ^you^you doing^ You tell Mycroft, 'Hi there, how are you doing?'