In X Windows you can cut and paste text and commands from one window to any window. To cut, click and drag the left button on the mouse to select the text. To paste, click on the right button on the mouse. This may be simpler than using the history commands. A quick double click will select a word while a triple click will select an entire line.