next up previous contents index
Next: Comments Up: Gnuplot Previous: Batch/Interactive Operation   Contents   Index


Command-line-editing

Command-line editing is supported by the Unix, Atari, VMS, MS-DOS and OS/2 versions of gnuplot. Also, a history mechanism allows previous commands to be edited and re-executed. After the command line has been edited, a newline or carriage return will enter the entire line without regard to where the cursor is positioned.

(The readline function in gnuplot is not the same as the readline used in GNU Bash and GNU Emacs. If the GNU version is desired, it may be selected instead of the gnuplot version at compile time.)

The editing commands are as follows:

Command-line Editing Commands
Character Function
  Line Editing
^B move back a single character.
^F move forward a single character.
^A move to the beginning of the line.
^E move to the end of the line.
^H, DEL delete the previous character.
^D delete the current character.
^K delete from current position to the end of line.
^L, ^R redraw line in case it gets trashed.
^U delete the entire line.
^W delete from the current word to the end of line.
  History
^P move back through history.
^N move forward through history.

On the IBM PC, the use of a TSR program such as DOSEDIT or CED may be desired for line editing. The default makefile assumes that this is the case; by default gnuplot will be compiled with no line-editing capability. If you want to use gnuplot's line editing, set READLINE in the makefile and add readline.obj to the link file. The following arrow keys may be used on the IBM PC and Atari versions if readline is used:

Arrow key Function
Left same as ^B.
Right same as ^F.
Ctrl Left same as ^A.
Ctrl Right same as ^E.
Up same as ^P.
Down same as ^N.

The Atari version of readline defines some additional key aliases:

Key Function
Undo same as ^L.
Home same as ^A.
Ctrl Home same as ^E.
Esc same as ^U.
Help `help` plus return.
Ctrl Help `help`.

next up previous contents index
Next: Comments Up: Gnuplot Previous: Batch/Interactive Operation   Contents   Index
Ethan Merritt 2007-03-03