In-line Editing Options

Normally, each command line entered from a terminal device is simply typed followed by a new-line (‘RETURN’ or ‘LINE FEED’). If either the emacs, gmacs, or vi option is active, the user can edit the command line. To be in either of these edit modes set the corresponding option. An editing option is automatically selected each time the VISUAL or EDITOR variable is assigned a value ending in either of these option names.

The editing features require that the user’s terminal accept ‘RETURN’ as carriage return without line feed and that a space (‘ ‘) must overwrite the current character on the screen.

The editing modes implement a concept where the user is looking through a window at the current line. The window width is ...

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.