Command-line editing and command history are supported using either an external gnu readline library, an external BSD libedit library, or a built-in equivalent. This choice is a configuration option at the time gnuplot is built.
The editing commands of the built-in version are given below. The gnu readline and BSD libedit libraries have their own documentation.
^B moves back a single character. ^F moves forward a single character. ^A moves to the beginning of the line. ^E moves to the end of the line. ^H and DEL delete the previous character. ^D deletes the current character. ^K deletes from current position to the end of line. ^L,^R redraws line in case it gets trashed. ^U deletes the entire line. ^W deletes from the current word to the end of line.
^P moves back through history. ^N moves forward through history.